W3C home > Mailing lists > Public > www-style@w3.org > October 2013

Re: .clearfix

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Mon, 21 Oct 2013 06:04:16 -0700
Message-ID: <CAAWBYDBRvKCX00cZWhAUi3G91RgEkiXtNOp+CD0d0wkfM5SSFg@mail.gmail.com>
To: Bruno Racineux <bruno@hexanet.net>
Cc: "Kang-Hao (Kenny) Lu" <kanghaol@oupeng.com>, www-style list <www-style@w3.org>
On Mon, Oct 21, 2013 at 2:09 AM, Bruno Racineux <bruno@hexanet.net> wrote:
> We are using either a floated block, an inline-block or a non-floated
> block with a clearfix hack, often mainly in order to simply have blocks
> vertically stacked (e.g. header, nav, main, footer) without any unwanted
> "freaking" spacing issues or background holes. You'd think one could very
> simple things like that by now with no hacks.

You can, with Flexbox.  Actual float clearing is needed very rarely
when using floats for their intended purpose of floating some figure
next to some text.  It's just the hacky method of using floats for
layout that needs it so often.

~TJ
Received on Monday, 21 October 2013 13:05:10 UTC

This archive was generated by hypermail 2.3.1 : Monday, 21 October 2013 13:05:10 UTC