Export to GitHub

blueprintcss - issue #24

v0.5 - container class does not clear:after


Posted on Sep 1, 2007 by Happy Dog
  1. create a page using the examples
  2. set borders on the container div
  3. notice the borders do not frame the page but indicate that the container div has collapsed due to the inside columns floating left.

This is particularly obvious when using different background colours for the body and the container div as the entire page will end up having the bgcolor of the body.

A little digging reveals that the .container:after css declaration has been dropped in version 0.5. Adding that back in from the old version fixes the issue.

I have tested in Safari 3.0.3 and Firefox 2.0 on MacOS X with consistent results.

Comment #1

Posted on Sep 1, 2007 by Happy Dog

Comment deleted

Comment #2

Posted on Sep 4, 2007 by Happy Giraffe

im facing the "clear:after" problem too..

  • made a container
  • made few columns in it
  • the container is not "cleared"
  • i figure it out by adding traditional before closing container, seems like clearing solve the problem, so .container:after need to be added back

gugakfugl, can i have the declaration for .container:after class? this is my first time using this framework, just downloaded it few minutes ago. thanks!

Comment #3

Posted on Sep 4, 2007 by Happy Dog

The missing code from 0.4 in its entirety (not sure how this will display):

/* Clearing floats without extra markup Based on How To Clear Floats Without Structural Markup by PiE [http://www.positioniseverything.net/easyclearing.html] */

.clear { display: inline-block; }
.clear:after, .container:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; } * html .clear { height: 1%; } .clear { display: block; }

Comment #4

Posted on Sep 4, 2007 by Happy Horse

Fixed for the next release, see SVN if you need this right away. :)

Status: Fixed

Labels:
Type-Defect Priority-Medium