[SOLVED] How to horizontally align div elements within a container
Sorry; I spoke too soon when I said the alignment problem described here http://forum.bytesforall.com/showthread.php?t=20603 was solved.
I'm still having the same problem! Can't find the right CSS code to align div elements properly in horizontal rows, floated left, without leaving a big space before the element starting in the second row. The php code for the template in question defines: Code:
<div class="associated-posts"> The following CSS aligns the .associated-post elements horizontally, within the .associated-posts container displayed on a page, but there still is a big gap in the second row, before the second row elements start. The third row, however, does wrap back left to the left margin: Code:
#post-756 .associated-posts { Code:
white-space: nowrap; Help!! What am I doing wrong? Many thanks in advance for any help!! |
O.K. With help of this article: http://robertnyman.com/2010/02/24/cs...-why-it-sucks/, I finally figured out a solution:
In the CSS for the <.associated-post> element, instead of using "float: left," I changed it to Code:
display: inline-block; Hope this helps others. Thanks. |
All times are GMT -6. The time now is 07:36 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.