Floating DIV's alignment problem.

Posted by Rodrigo on Stack Overflow See other posts from Stack Overflow or by Rodrigo
Published on 2010-06-03T00:14:12Z Indexed on 2010/06/03 0:24 UTC
Read the original article Hit count: 674

Filed under:
|
|
|

I have a fluid layout with DIV's of different heights and widths, and I'd like them to be aligned by lines, kind of like when you do a search on istockphoto, except aligned to the top:

image here-->http://i207.photobucket.com/albums/bb121/jpbanks/Capturadepantalla2010-06-02alas1902.png

I tried floating all the DIV's to the left, but they are not aligned correctly into lines:

image here-->http://i207.photobucket.com/albums/bb121/jpbanks/Capturadepantalla2010-06-02alas1900.png

See how "Prueba" doesn't go all the way to the left? I thought of the jQuery plugin Masonry but what I want is obviously different. Any solution using either CSS or jQuery would be fine. Any ideas?

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about css