As mentioned above the easiest option is to float the parent element of each block to the left and apply a suitable width, height (in ems) and margins. You will need a height because the floats will snag if they are not all the same height.
Or if you don’t want to (or can’t) set a height then you could use display:inline-block as shown in this old example.
No, I think you misread the answer. (Although it may not have helped, anyhow.) One of the problems (though not the only problem, is this line in your code:
<div style="clear:both;"> </div>
which forces each thumbnail to sit on a new line. But that’s not the only issue.
Your code structures at the top of the page are different from the bottom. You could try modifying this
Hi, you need to float #bx :). Basically you floated the child of #bx, which doesn’t quite work because the parent is still a normal block taking up the full width. You also need to remove the width set on it, because right now it’s taking up the full width of the column :). Or you can set a fixed width (that is less than 650, but allows items to be horizontal) on it.
You also need to remove every single [LEFT]<div style=“clear:both;”> </div> you have on that section. It will never let the floating work :). How many do you want horizontally aligned? Looks like the page can only comfortably fit 2 in a row, MAYBE 3 if you squish it.[/LEFT]
It worked for me in testing with Firebug by editing the HTML (although the CSS is not perfect), but the system is somehow adding in an extra
<div class="menu grid_4">
which is messing things up. I don’t understand the PHP well enough to understand why that’s being inserted. Looks like it’s coming from above that PHP block you posted.
That link is showing hte products going horizontal. I’m very confused now. I thought your objective was to get the other link displaying horizontally? :). Sorry for being dense.
So basically you want that stuff to be horizontal. Gotcha.
Well it looks like on this element below, you have a width of 220px set. Which makes it impossible for anthing to be on teh same line because there just isn’t enough width.
.container_16 .grid_4
{
/*remove the width:220px;*/
overflow:hidden;/*add*/
}
I changed those two things and it worked. It’s now displaying horizontally. You’ll have to tinker with some widths to get 4 displaying on a row (currently 3) but that’s simple. If you need help with it though, feel free to shout :).
Edit-Just so you know, that suggestion will make EVERYTHING horizontal. I can offer code if you want to select a specific section in that page, but for now, that code will select all the products (basically everything with a .grid_4 class :))
It seems you have made the items go horizontal now but because you used floats and the elements are different heights they are snagging when they wrap exactly as I mentioned in my first post :).
You need to use inline-block so add this code without alteration after all your existing code:
.menu {
float:none!important;
display:inline-block;
*display:inline;/* ie6/7 inline-block hack - do not change order or remove anything */
zoom:1.0;/* ie6/7 inline-block hack*/
vertical-align:top;
margin-bottom:10px;
}