Solarpitch Posted April 15, 2007 Share Posted April 15, 2007 Hey, Just wondering if someone can give me a hand with the below style. I am trying to use div's to style but there not my strong point. I can do the colour changing background on each result and that, but I am just having trouble trying to lay the information out in the 3 style column I have. Thanks Quote Link to comment https://forums.phpfreaks.com/topic/47106-looking-for-help-on-achieving-a-style-example-shown/ Share on other sites More sharing options...
AndyB Posted April 15, 2007 Share Posted April 15, 2007 Actually, that looks like tabular information which makes the html table the ideal way to present the information. By all means style the content, but don't force tabular data into a CSS div arrangement - makes no sense. Quote Link to comment https://forums.phpfreaks.com/topic/47106-looking-for-help-on-achieving-a-style-example-shown/#findComment-229732 Share on other sites More sharing options...
Zeon Posted April 16, 2007 Share Posted April 16, 2007 html: <div class="odd"> <div>column1 content</div> <div>column2 content</div> <div> <ul> <li>website</li> <li>e-mail</li> <li>phone</li> </ul> </div> <div class="clearer"></div> // you need this so the container extends to the height of the content </div> <div class="even"> <div>column1 content</div> <div>column2 content</div> <div> <ul> <li>website</li> <li>e-mail</li> <li>phone</li> </ul> </div> <div class="clearer"></div> // you need this so the container extends to the height of the content </div> css: div.even, div.odd{ clear:both; } div.even div, div.odd div{ float:left; } div.clearer{ float:none; clear:both; } but it is much simpler with tables and like AndyB said there's no need for divs in this case Quote Link to comment https://forums.phpfreaks.com/topic/47106-looking-for-help-on-achieving-a-style-example-shown/#findComment-230196 Share on other sites More sharing options...
Solarpitch Posted April 16, 2007 Author Share Posted April 16, 2007 Thanks for that. Your right, ill use tables! But thanks for that code mate . . that will come in handy! Cheers Quote Link to comment https://forums.phpfreaks.com/topic/47106-looking-for-help-on-achieving-a-style-example-shown/#findComment-230655 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.