W3C home > Mailing lists > Public > www-style@w3.org > November 1999

Re: margin-box

From: Ian Hickson <py8ieh@bath.ac.uk>
Date: Fri, 5 Nov 1999 02:43:04 +0000 (GMT)
To: "L. David Baron" <dbaron@fas.harvard.edu>
cc: www-style <www-style@w3.org>
Message-ID: <Pine.GSO.4.04.9911050239110.5039-100000@mary.bath.ac.uk>
On Wed, 20 Oct 1999, L. David Baron wrote:

> In [1], Tantek Celik wrote that he could not come up with a use for
> a 'margin-box' value of the 'box-sizing' property. I think there is
> an real use: to make a table with margin 100% of the width of its
> parent element, but not overflow the parent.
> However, the concerns he raises about margin-box and collapsing
> margins are serious. Perhaps 'margin-box' could mean margin-box
> horizontally and padding-box vertically?

Actually, I'm not sure that the problems with margin-box and
vertically collapsing margins _are_ serious, since the collapsing is
done _after_ the 'height' calculations. 

The height for 'margin-box' would simply be:

   computed value for height = specified value for height - 
     (margin-top + border-width-top + padding-top +
      border-width-bottom + padding-bottom + margin-bottom)

What is the problem?

As David says, this is rather important with tables which specify
margins and want to be 100% the width of the parent (since
'width:auto' on tables triggers the automatic layout algorithm and not
the normal horizontal box model calculations).

> [1] http://lists.w3.org/Archives/Public/www-style/1999Oct/0036.html

Ian Hickson
"So far, people have shown a reasonable amount of sense in evaluating
souls (whether they are properly priced)."
  -- Nick Gibbins; Author of http://totl.net/Soul/, 1999-10-05
Received on Thursday, 4 November 1999 21:43:09 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:26:52 UTC