Sent by Holly Bergevin on 28 March 2004 03:03
From: Bruce Cameron [EMAIL-REMOVED]>
Date: Thu, 25 Mar 2004 14:45:16 -0500
> setting margins and padding on everything to
>zero did not eliminate the gap at the top.
But... It doesn't appear that you've set the margin-top of the paragraph to zero...
>If the central text item is
>removed, no gap at the top for the images [but as noted earlier, a
>border on the text div, no gap]. Margins on the text div and the
>paragraph, still the gap. BUT if the <p>. is 'removed', text only in
>the <div> the gap is GONE!!!
Yes, because you removed the element that had the default margin that you hadn't accounted for.
>
>http://www.midcoast.com/~dumarest/temp/planningtemplateY.htm
>http://www.midcoast.com/~dumarest/temp/planningboardY.css
>
>The original, with the gap, for comparison
>
>http://www.midcoast.com/~dumarest/temp/planningtemplateX.htm
>http://www.midcoast.com/~dumarest/temp/planningboardX.css
>
>I still would like to know why,
Why is that there is still a pesky "hidden" margin to account for. Zero that and NS et.al. will
snug up the space like IE (incorrectly) does.
>I know it has something to do with collapsing margins
><http://www.w3.org/TR/2004/CR-CSS21-20040225/box.html#collapsing-
>margins> between the h2 and h1 and its children, but I'm not yet good
>at figuring exactly how the pieces interact with nested elements and
>margins.
The paragraph is a child of that h1, and that's the element (<p>) that the margin is on that you
need to eliminate.
hth,
~holly
______________________________________________________________________
css-discuss [EMAIL-REMOVED]]
http://www.css-discuss.org/mailman/listinfo/css-d
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/