|
Posted by dorayme on 01/04/08 23:41
In article <slrnfntd14.il9.spamspam@bowser.marioworld>,
Ben C <spamspam@spam.eggs> wrote:
> Regular readers of alt.html will by now be familiar with the idea of
> using Block Formatting Contexts to cause containers to grow in height to
> accommodate floated descendents.
>
> But here we are using two other useful properties of BFCs:
>
> 1. The clear instruction clears floats _within the same BFC_. By making
> #page-center-column a BFC, it becomes the BFC for #clear. That means
> that #clear no longer clears the two big floats to the left and right
> (page-left-column and page-right-column).
> 2. A BFC with auto width, unlike a regular block box, _itself becomes
> narrower_ to squeeze between floats. A regular block box doesn't, it
> occupies the full available width and its inline contents flow around
> the floats. That was why you were using those 210px margins on
> #page-center-column. If #page-center-column is a BFC, it no longer
> wants those margins.
>
> This is all standard CSS 2.1 (well, pretty much, the specification does
> allow for #page-center-column to move below the two floats rather than
> squeeze between them, but I don't know of any browsers that actually do
> that).
I hope you realise that every time you say stuff like this, it
makes work for me! I scurry off to see if I have to include extra
material into the story I am writing on parents and floated
children. So please be very responsible in what you say.
<g>
--
dorayme
Navigation:
[Reply to this message]
|