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

Re: Margin-color; text-indent; browser detection without script; attribute selector, ! combinator

From: Matthew Brealey <thelawnet@yahoo.com>
Date: Thu, 11 Nov 1999 08:08:18 -0800 (PST)
Message-ID: <19991111160818.11892.rocketmail@web906.mail.yahoo.com>
To: www-style <www-style@w3.org>
> > > > --- "Braden N. McDaniel"
> <braden@endoframe.com>>
> > > wrote:
> > > 1. I still disagree, because:
> > > BODY {
> > > margin: 2em;
> > > background-color: red}
> > > will result in the whole canvas being coloured
> red -
> > > the margins won't be transparent.
> 
> Not necessarily. The outcome you describe should
> occur *if and only if*
> the value of "background" for HTML is "transparent".
How can an element be transparent to an element in
front of it (disregarding z-index)?

Just as:

DIV.outer {background: transparent}
DIV.inner {background: red;
margin: someamount}

<div class="outer">
<div class="inner">
</div>
</div>

Would give DIV.inner a red background, but would give
DIV.outer a transparent background (grey or white,
depending on UA), so too would:

HTML {background: transparent}
BODY {background: red;
margin: someamount}

<html>
<body>
</body>
</html>

Thus if we adopt your reading of the spec, the
inescapable conclusion is that giving BODY a margin
and a background will cause different colour margins
to HTML.
<Q>-- margins are always transparent -- <Q> - (at the
bottom of 8.2)


=====
----------------------------------------------------------
From Matthew Brealey (http://members.tripod.co.uk/lawnet (for law)or http://members.tripod.co.uk/lawnet/WEBFRAME.HTM (for CSS))
__________________________________________________
Do You Yahoo!?
Bid and sell for free at http://auctions.yahoo.com
Received on Thursday, 11 November 1999 11:08:19 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:01 GMT