what is there between the canvas and the viewport

B

Barbara de Zoete

I've set a max-width for the html of my pages. With CSS I gave some colour to
text and elements et cetera. Well, you know the routine.

What I wounder is, why is the colour I've set as the background colour for the
html element, the colour that gets applied to the background of the viewport,
even the part that is outside the border I've also put around the html element?
What is picking up this colour? What else is there outside the borders of the
html element?
You can only see this happening with my pages in a viewport that is wider than
60em and when using a modern graphical browser (that is not IE Win) of course.

--
,-- --<--@ -- PretLetters: 'woest wyf', met vele interesses: ----------.
| weblog | http://home.wanadoo.nl/b.de.zoete/_private/weblog.html |
| webontwerp | http://home.wanadoo.nl/b.de.zoete/html/webontwerp.html |
|zweefvliegen | http://home.wanadoo.nl/b.de.zoete/html/vliegen.html |
`-------------------------------------------------- --<--@ ------------'
 
S

Steve Pugh

Barbara de Zoete said:
I've set a max-width for the html of my pages. With CSS I gave some colour to
text and elements et cetera. Well, you know the routine.

What I wounder is, why is the colour I've set as the background colour for the
html element, the colour that gets applied to the background of the viewport,
even the part that is outside the border I've also put around the html element?
What is picking up this colour? What else is there outside the borders of the
html element?

http://www.w3.org/TR/CSS21/colors.html#q2
"The background of the root element becomes the background of the
canvas and covers the entire canvas, anchored at the same point as it
would be if it was painted only for the root element itself. The root
element does not paint this background again.

For HTML documents, however, we recommend that authors specify the
background for the BODY element rather than the HTML element. User
agents should observe the following precedence rules to fill in the
background of the canvas of HTML documents: if the value of the
'background' property for the HTML element is different from
'transparent' then use it, else use the value of the 'background'
property for the BODY element. If the resulting value is
'transparent', the rendering is undefined. This does not apply to
XHTML documents."

Steve
 
J

Jan Roland Eriksson

On Thu, 31 Mar 2005 09:25:28 +0200, "Barbara de Zoete"

[now crossed to both alt.html and ciwas]
I've set a max-width for the html of my pages. With CSS I gave some colour to
text and elements et cetera. Well, you know the routine.

What I wounder is, why is the colour I've set as the background colour for the
html element, the colour that gets applied to the background of the viewport,
even the part that is outside the border I've also put around the html element?
What is picking up this colour? What else is there outside the borders of the
html element?

Hard to know exactly what you mean without a live case to study but it
may be that you are "confused" by the following part of CSS2.1

<http://www.w3.org/TR/CSS21/colors.html#q2>

third paragraph...

"The background of the root element becomes the background of the
canvas and covers the entire canvas, anchored at the same point
as it would be if it was painted only for the root element itself.
The root element does not paint this background again."

This behavior of a background color as applied to a HTML root element
was discussed at some considerable length on the style list as well as
in ciwas a couple of years back and IMMIC we did finally arrive at a
consensus that this root element background behavior was at least the
"least harmful" way to go.

As the specs also says; you are not really supposed to do much
background styling of the <HTML...> element but instead concentrate on
<BODY...> and its content.
 
S

Spartanicus

E

Els

Jan said:
On Thu, 31 Mar 2005 09:25:28 +0200, "Barbara de Zoete"

[now crossed to both alt.html and ciwas]
I've set a max-width for the html of my pages. With CSS I gave some colour to
text and elements et cetera. Well, you know the routine.

What I wounder is, why is the colour I've set as the background colour for the
html element, the colour that gets applied to the background of the viewport,
even the part that is outside the border I've also put around the html element?
What is picking up this colour? What else is there outside the borders of the
html element?

Hard to know exactly what you mean without a live case to study

That's only because you didn't read Barbara's sig :)
 
B

Barbara de Zoete

I've set a max-width for the html of my pages. With CSS I gave some colour to
text and elements et cetera. Well, you know the routine.

What I wounder is, why is the colour I've set as the background colour for the
html element, the colour that gets applied to the background of the viewport,
even the part that is outside the border I've also put around the html
element? What is picking up this colour? What else is there outside the
borders of the html element?
You can only see this happening with my pages in a viewport that is wider than
60em and when using a modern graphical browser (that is not IE Win) of course.

Clearly a case of misinterpreting the word 'canvas'. Thanks for the explanation
on the subject.

--
,-- --<--@ -- PretLetters: 'woest wyf', met vele interesses: ----------.
| weblog | http://home.wanadoo.nl/b.de.zoete/_private/weblog.html |
| webontwerp | http://home.wanadoo.nl/b.de.zoete/html/webontwerp.html |
|zweefvliegen | http://home.wanadoo.nl/b.de.zoete/html/vliegen.html |
`-------------------------------------------------- --<--@ ------------'
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,000
Messages
2,570,248
Members
46,844
Latest member
JudyGvh32

Latest Threads

Top