[HTML5] Layout Problem: Floating Elements with different heights breaks the flow.
zcorpan at gmail.com
Wed Feb 21 16:56:17 PST 2007
(Sent to the help mailing list instead.)
On Wed, 21 Feb 2007 18:58:17 +0100, Shlomi Asaf <neoswf at gmail.com> wrote:
> i have a "table" like layout.
> here is a live example:
> all the floating divs has the same height. i haven't written the height
> the css- the content is the same.
> all the titles are one line height.
> but what happens when one title is longer? the layout breaks and the
> float element looks for his position in a the next empty space - after
> high element.
This is because floats weren't actually intended for page layout. The main
intended use was to float an image to the left or the right and let the
text flow around the image. See e.g.
> how can i solve this problem?
You could use display:table, but IE doesn't support that yet. Otherwise if
scrollbars are acceptable then you could specify a max-height (in ems) and
More information about the Help