W3C home > Mailing lists > Public > whatwg@whatwg.org > February 2007

[whatwg] Layout Problem: Floating Elements with different heights breaks the flow.

From: Shlomi Asaf <neoswf@gmail.com>
Date: Wed, 21 Feb 2007 19:58:17 +0200
Message-ID: <142e5f5b0702210958s38d1c851ma5040a95e7f14eba@mail.gmail.com>
Hi
i have a "table" like layout.
here is a live example: http://www.webcssdesign.34sp.com/me/floatingDivs.htm

all the floating divs has the same height. i haven't written the height in
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 lower
float element looks for his position in a the next empty space - after the
high element.

how can i solve this problem?
i can find few suggestion but none of them satisfy me:

   1. an Element with clear:both after each ending line.
   2. a Specific height and a overflow:hidden to the title.
   3. a Table

all those solutions are bed.

   1. clear both hurts the simplistic of the server side work- the server
   side programer will have to count the number of elements in each raw and
   then place the clearing element
   2. the height makes the layout inflexible, and empty space where they
   will be only 1 line title
   3. i don't want to get into that :)

any help will be appreciated

Tnx a Lot
NeoSwf
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20070221/58684084/attachment.htm>
Received on Wednesday, 21 February 2007 09:58:17 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:08:32 UTC