How to deal with displaying several result generated with "WHERE" condition
13 posts by 4 authors in: Forums > CMS Builder
Last Post: January 27, 2010 (RSS)
By petejdg - January 26, 2010
Ross,
I am trying to do this same thing. I took the code and fit it to my needs and it works, but I can't get the formatting down. There wasn't a solution posted with the final code - and in messing with my code - I can't get it figured out. I was trying to add a div to go around each theme/category as right now when the second theme/category appears it is in the upper right. It should be 3 wide and then the next theme/category should fall below. The div I was trying to add is the "linklooper".
Should be:
Theme/Category1
item 1 item2 item3
Theme/Category2
item 1 item2 item3
Here is where my page is:
http://www.jdg-kiln.com/about_phillips_kiln/links.php
I am trying to do this same thing. I took the code and fit it to my needs and it works, but I can't get the formatting down. There wasn't a solution posted with the final code - and in messing with my code - I can't get it figured out. I was trying to add a div to go around each theme/category as right now when the second theme/category appears it is in the upper right. It should be 3 wide and then the next theme/category should fall below. The div I was trying to add is the "linklooper".
Should be:
Theme/Category1
item 1 item2 item3
Theme/Category2
item 1 item2 item3
Here is where my page is:
http://www.jdg-kiln.com/about_phillips_kiln/links.php
Re: [petejdg] How to deal with displaying several result generated with "WHERE" condition
By Chris - January 26, 2010 - edited: January 26, 2010
Hi petejdg,
You'll need to add a "clear" command to reset things after all your floats. This CSS will do this trick:
.linklooper H2 { clear: both; }
Secondly, your linklooper's width of 600px isn't quite wide enough for three of your divs, since 3*(160px + 2*15px(margin) + 2*5px(padding) + 2*1px(border)) == 606px. If you increase the width of .linklooper, you should be able to get three across.
Firebug for the win! :D
I hope this helps. Please let me know if you have any questions.
You'll need to add a "clear" command to reset things after all your floats. This CSS will do this trick:
.linklooper H2 { clear: both; }
Secondly, your linklooper's width of 600px isn't quite wide enough for three of your divs, since 3*(160px + 2*15px(margin) + 2*5px(padding) + 2*1px(border)) == 606px. If you increase the width of .linklooper, you should be able to get three across.
Firebug for the win! :D
I hope this helps. Please let me know if you have any questions.
All the best,
Chris
Chris
Re: [chris] How to deal with displaying several result generated with "WHERE" condition
By petejdg - January 27, 2010
Wow, thanks, it worked like a charm - I wasn't even thinking in that direction. Also, I guess I need to brush up on my math!
thanks!
thanks!