[thelist] aligning floated divs.

Liam Delahunty ldelahunty at britstream.com
Thu Mar 27 14:44:23 CST 2003


Kevin Cannon wrote:
>look at the floating thumbnails example at:
>http://realworldstyle.com/thumb_float.html

Thanks, that's pretty much the code I had come up with previously. The
problem is if the thumbs aren't all the same height then the wrapping
becomes eccentric.

To solve this I've decided to read all the thumbnails in, find the max
height then write the div heights so they'll wrap okay.

If you visit this example page, you'll see (in IE 5.5) at least that forcing
the height allows the wrap to work as desired.
http://www.corx.co.uk/onlinesales/index.php?category_id=1&gallery_id=8
though in Opera the width isn't working at all.

In experimenting I've found a little problem/bug with width: auto when
combined with overflow: auto;

In IE 5.5, the div has scrollbars indicating a load of space when the
contents should fit into the layer without a problem...
http://www.corx.co.uk/onlinesales/evolt.php?category_id=1&gallery_id=8
here why does the first piece (B-Star & Riz) fit okay, but the fourth
(Con-Yah), which looks exactly the same, have a horizontal scroll...

I can see I've a few other problems with the code, and will play more
later...

Kind regards, Liam Delahunty, Mega Products Limited
http://www.megaproducts.co.uk/ web design, programming, e-commerce
http://www.onlinesales.co.uk/ Open Source PHP/MySQL E-commerce App.
http://www.britstream.com/ Hosting/ Domain Names From UKP 7.50 p.a.



More information about the thelist mailing list