Thu, 2011-01-27 02:28
I thought I fixed this, but it's started going crazy again.
Basically, I coded my friend's portfolio using ModX and CSS. But when it loads the blocks, sometimes there is a blank one. It's much easier to just see as opposed to my trying to explain: http://www.erinkong.com/index.php?id=47.
Here is the code that loads each individual block:
<div class="galleryblock"><a href="[~[+id+]~]"><img src="[+image+]" width="175" height="130" border="0" /><br />[+pagetitle+]</a></div>
And here is the css for the div class:
.galleryblock { display: inline; width: 200px; float: left; position: relative; text-align: center; padding-top: 20px; vertical-align: top; }
I thought I had fixed this. Gahhh!
Thank you!
-Laura
Thu, 2011-01-27 03:05
#1
The CSS3 solution would be to
The CSS3 solution would be to use
.galleryblock:nth-child(3n+1) { clear: left; }
You could also do a count in the PHP to give every fourth element a class and use that to clear with