[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';
$query = $this->db->query($sql);
echo "<div style='position:relative; width:800px;'>";
foreach ($query->result() as $row):
echo "<div style=' float:left; clear:right; width:20%; background:#ffa none'>";
foreach($row as $line):
echo '<p>';
echo substr($line, 0, 142); // change to suit
echo '</p>';
endforeach;
echo '</div>';
endforeach;
echo '</div>';
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