At 10:00 AM -0500 12/17/10, Tim White wrote:
On Fri, Dec 17, 2010 at 9:39 AM, sweepslate <sweepsl...@gmail.com> wrote:
I have two floats, one next to the other, content and side. There is a third
box under them, the footer. I'd like the footer to have some margin-top, but
I can't manage that, even with clear:both.
....
.... if you put clear:both on your footer it will be pushed down just
far enough to clear the floats; and thus no 'extra' margin.
To clarify, the cleared element does have a top margin. It's just
that the top margin is set by the browser to be wide (tall?) enough
to push the element's top outer border edge past the float's bottom
outer margin edge. In other words, the '10px' value is overridden by
the browser because it needs more than 10px of top margin to push the
cleared element down far enough. If that were changed to, say,
'10000px' then you'd see the top margin in full force.
As Tim says, the usual solution is to set your ten pixels on the
bottom margin(s) of the floated element(s), not the top of the
cleared element.
--
Eric A. Meyer (http://meyerweb.com/eric/), List Chaperone
"CSS is much too interesting and elegant to be not taken seriously."
-- Martina Kosloff (http://mako4css.com/)
______________________________________________________________________
css-discuss [cs...@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/