Copy link to clipboard
Copied
I preformed a query and got a long list. The output doesn't take up that much horizontal space and so I'd like to make two columns with it to save on scrolling. Is that possible with CSS?
Here's my list looks like this:
![]() | Name: Snowfresh Brewer: Edelweiss Overall: 3.5 |
![]() | Name: Zepplin Brewer: Leibringer Overall: 3 |
And the code:
<p>German List:</p>
<table width="182" height="145" border="0">
<?php
//Puts it into an array
while($info = mysql_fetch_array( $data )) {
//Outputs the image and other data ?>
<tr>
<td><?php echo "<img src=http://localhost/beer_diary/images/beer_tasted_profile/".$info['image_id'] ."><br/>";?></td>
<td><?php echo "<b>Name:</b> ".$info['beer_name']. "<br> ";
echo "<b>Brewer:</b> ".$info['brewer']. "<br> ";
echo "<b>Overall:</b> ".$info['overall_id']; }?></td>
</tr>
</table>
<p> </p>
Yea, CSS3 columns are about as helpful as CSS3 regions at this point. I'd recommend this article for turning a list into columns:
Copy link to clipboard
Copied
Do you want the data to flow left to right, then down, or run like newspaper columns? For the former, you can use a horizontal looping technique; basically just a nested loop that outputs two rows from the database for every row on the page. For the latter, CSS3 supports newspaper columns now. I've not used that method, but you can google it.
Copy link to clipboard
Copied
The CSS3 newspaper-type columns work well, except that no version of Internet Explorer will be able to render them.
Copy link to clipboard
Copied
Yea, CSS3 columns are about as helpful as CSS3 regions at this point. I'd recommend this article for turning a list into columns:
Copy link to clipboard
Copied
That's a great article, thank you
Copy link to clipboard
Copied
Thank you everyone!
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more