Stephen68 Posted October 10, 2010 Share Posted October 10, 2010 Hello all! I'm using PHP to query some information from a DB. I then wanted to loop through the results and have them display 3 wide and however many down I need. I wanted to try and do this with CSS so I made this container code I guess it would be called. #item_container { position:relative; width:158px; height:193px; z-index:2; } But I'm not sure how to get them to go side by side, if I use absolute they just all stack on top of each other. and Relative just list one under the other straight down the page. Am I missing something or do I have to figure out how to put a location value in there? Any help would be great! Thanks! Stephen Link to comment https://forums.phpfreaks.com/topic/215541-div-layout/ Share on other sites More sharing options...
Stephen68 Posted October 10, 2010 Author Share Posted October 10, 2010 I failed to say that the site is laid out in tables, so the information that I'm trying to get side by side is located in a table cell. Link to comment https://forums.phpfreaks.com/topic/215541-div-layout/#findComment-1120776 Share on other sites More sharing options...
Stephen68 Posted October 10, 2010 Author Share Posted October 10, 2010 Figured it out I just needed to add a float value in there, works great not. #item_container { float:left; text-align:center; width:158px; height:193px; border:dashed; border-color:#F00; z-index:2; } Cheers! Stephen Link to comment https://forums.phpfreaks.com/topic/215541-div-layout/#findComment-1120780 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.