Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > what is there between the canvas and the viewport

Reply
Thread Tools

what is there between the canvas and the viewport

 
 
Barbara de Zoete
Guest
Posts: n/a
 
      03-31-2005
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 |
`-------------------------------------------------- --<--@ ------------'
 
Reply With Quote
 
 
 
 
Steve Pugh
Guest
Posts: n/a
 
      03-31-2005
"Barbara de Zoete" <(E-Mail Removed)> wrote:

>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

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <(E-Mail Removed)> <http://steve.pugh.net/>
 
Reply With Quote
 
 
 
 
Jan Roland Eriksson
Guest
Posts: n/a
 
      03-31-2005
On Thu, 31 Mar 2005 09:25:28 +0200, "Barbara de Zoete"
<(E-Mail Removed)> wrote:

[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.

--
Rex


 
Reply With Quote
 
Spartanicus
Guest
Posts: n/a
 
      03-31-2005
Please do not include prose in the subject that cannot be found in the
body.

"Barbara de Zoete" <(E-Mail Removed)> wrote:

Subject: what is there between the canvas and the viewport

I suspect that you misunderstand what "canvas" means:
http://www.w3.org/TR/CSS21/intro.html#q4

>I've set a max-width for the html of my pages.


What viewport width people find comfortable varies, why impose your
maximum preference?

Btw, your pages break to easily:
http://homepage.ntlworld.com/spartanicus/barbara.png

--
Spartanicus
 
Reply With Quote
 
Els
Guest
Posts: n/a
 
      03-31-2005
Jan Roland Eriksson wrote:

> On Thu, 31 Mar 2005 09:25:28 +0200, "Barbara de Zoete"
> <(E-Mail Removed)> wrote:
>
> [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

--
Els http://locusmeus.com/
Sonhos vem. Sonhos vo. O resto imperfeito.
- Renato Russo -
Now playing: Madness - Victoria Gardens
 
Reply With Quote
 
Barbara de Zoete
Guest
Posts: n/a
 
      04-01-2005
On Thu, 31 Mar 2005 09:25:28 +0200, Barbara de Zoete <(E-Mail Removed)>
wrote:

> 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 |
`-------------------------------------------------- --<--@ ------------'
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to couper contenier of a canvas in an outer canvas??? olsr.kamal@gmail.com Python 10 03-15-2013 08:46 PM
Pic and Viewport design question Csaba Gabor HTML 11 04-02-2005 01:32 AM
Pic and Viewport design question Csaba Gabor Javascript 12 04-02-2005 01:32 AM
Canvas with scrollbars - how to get correct canvas coordinate when the scroll bars have moved? PhilC Python 2 10-25-2004 11:57 AM
Canvas scrolling - scrollBar become "disabled" on change in canvas Askari Python 2 08-30-2004 02:56 PM



Advertisments