Le 14 juil. 2012 à 12:39, John a écrit : > On Jul 13, 2012, at 8:19 PM, Philippe Wittenbergh wrote: > >> You'll need to give some more information… > > Here is a link to the html file: > > http://coffeeonmars.com/testing/start.html > > ah..seems I DO have block-level content, but why does that cause an adding to > the height?
Indeed it is what I thought. The (default) margins on the <h1> are prevented to collapse through the outer edge of the div. That is the normal behaviour. When the parent element (#header in your case) has no border and no padding, the top/bottom margins of the child block-level element merge with the margins of the parent block and/or or the top/bottom margins of the preceding/subsequent block-level element. Borders and padding (-top/-bottom) prevent those margins form protruding outside of that div. The whole mechanism is described here: http://www.w3.org/TR/CSS21/box.html#collapsing-margins Philippe -- Philippe Wittenbergh http://l-c-n.com/ ______________________________________________________________________ css-discuss [[email protected]] 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/
