![]() |
HTML Table display horizontally/changing orientation - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: HTML Table display horizontally/changing orientation (/showthread.php?tid=2507) |
HTML Table display horizontally/changing orientation - El Forum - 08-09-2007 [eluser]Carlton[/eluser] Is it possible to alter the orientation of a table....at the moment I have a table with 60+ columns and 2 rows so ideally would like to display it as 60+ rows and 2 columns. Similar to how you would layout a form I guess. Is this possible using the table library at all? HTML Table display horizontally/changing orientation - El Forum - 08-11-2007 [eluser]John_Betong[/eluser] Quote:Is it possible to alter the orientation of a table....at the moment I have a table with 60+ columns and 2 rows so ideally would like to display it as 60+ rows and 2 columns. Similar to how you would layout a form I guess. Try putting the table into the following "<div " statement and change the values to suit your particular needs. Code: <div style='white-space:nowrap; overflow:auto; width:22em; height:10em; background:#afa none'> Tested in FireFox, Opera and IE6, no idea about Mac bowsers Cheers, John_Betong HTML Table display horizontally/changing orientation - El Forum - 08-11-2007 [eluser]John_Betong[/eluser] WHOOPS I completely missed the point and was way off on a tangent! Never mind you now have an alternative to scroll horizontally ![]() Try this instead for a solution to list all your table fields vertically: Code: $sql = 'select * from YOUR_TABLE_NAME_GOES_HERE'; The idea of the second <div...> was to get the rows to display in a grid. If this is not required then rem out the start and finish of the <div...>. Cheers, John_Betong |