[css-d] the box that clears float can't have margin?

2010-12-17 Thread sweepslate
Hi all! This is my first post here. 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 I want the footer to have a margin-top then I have to

Re: [css-d] the box that clears float can't have margin?

2010-12-17 Thread Tim White
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. Per the spec: Then

Re: [css-d] the box that clears float can't have margin?

2010-12-17 Thread Chetan Crasta
The reason that the margin-top on the div#footer has no effect on the floated div#content and div#side is floated boxes are not in the flow and are therefore invisible to other block boxes. You have three options to create the 10px gap: div#content , div#side { margin-bottom:10px; } Or:

Re: [css-d] the box that clears float can't have margin?

2010-12-17 Thread Eric A. Meyer
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

Re: [css-d] the box that clears float can't have margin?

2010-12-17 Thread Chetan Crasta
 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, '1px' then you'd see the top margin in full force. I put a margin-top of 1px (and more) on

Re: [css-d] the box that clears float can't have margin?

2010-12-17 Thread sweepslate
On 12/17/2010 5:34 PM, Eric A. Meyer wrote: 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'

Re: [css-d] the box that clears float can't have margin?

2010-12-17 Thread Chetan Crasta
I put a margin-top of 1px (and more) on div#footer, but did not see any effect. The margin-top had no effect because it was collapsing through div#wrapper. It worked after I put padding-top:1px on div#wrapper. ~Chetan __