Re: The canvas

On Thu, 11 Nov 1999 10:53:30 -0800, Todd Fahrner (
> It's been a while since I thought hard about this, but I remember my 
> conclusion: the root element can have neither margins nor border, 
> only padding. The "box acid test" 
> ( was coded in accord with this 
> belief.

I can understand why you would say it can't have margin.  However, why
no border?  According to CSS2 8.5.3 [1], the background covers to the
border edge (not the padding edge), so there's no problem with dashed
or dotted or transparent borders.  (Section 14.2 [2] seems to disagree
with this, though, but 8.5.3 makes more sense.)

I don't think your conclusion *must* follow from the spec.  It's one of
the options (maybe - see below), but since the root element's
background covers the entire canvas, it could just cover the root
element's margin (and all the area outside the root element's margin
caused by horizontal scrollbars).

For that matter, how does your view explain that the background extends
to the right when there's a horizontal scrollbar (since the fourth
paragraph of CSS2 section 9.1.2 [3] says that the width of the root
element is the width of the viewport)?


     (thanks to Ian Hickson for finding this reference which I knew
	 existed somewhere)

L. David Baron    Sophomore, Harvard (Physics)
Links, SatPix, CSS, etc.     <URL: >
WSP CSS AC                      <URL: >

Received on Thursday, 11 November 1999 20:07:40 UTC