what is there between the canvas and the viewport

Discussion in 'HTML' started by Barbara de Zoete, Mar 31, 2005.

  1. 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 |
    `-------------------------------------------------- --<--@ ------------'
    Barbara de Zoete, Mar 31, 2005
    #1
    1. Advertising

  2. Barbara de Zoete

    Steve Pugh Guest

    "Barbara de Zoete" <> 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 <> <http://steve.pugh.net/>
    Steve Pugh, Mar 31, 2005
    #2
    1. Advertising

  3. On Thu, 31 Mar 2005 09:25:28 +0200, "Barbara de Zoete"
    <> 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
    Jan Roland Eriksson, Mar 31, 2005
    #3
  4. Barbara de Zoete

    Spartanicus Guest

    Please do not include prose in the subject that cannot be found in the
    body.

    "Barbara de Zoete" <> 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
    Spartanicus, Mar 31, 2005
    #4
  5. Barbara de Zoete

    Els Guest

    Jan Roland Eriksson wrote:

    > On Thu, 31 Mar 2005 09:25:28 +0200, "Barbara de Zoete"
    > <> 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 vão. O resto é imperfeito.
    - Renato Russo -
    Now playing: Madness - Victoria Gardens
    Els, Mar 31, 2005
    #5
  6. On Thu, 31 Mar 2005 09:25:28 +0200, Barbara de Zoete <>
    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 |
    `-------------------------------------------------- --<--@ ------------'
    Barbara de Zoete, Apr 1, 2005
    #6
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Csaba Gabor

    Pic and Viewport design question

    Csaba Gabor, Mar 22, 2005, in forum: HTML
    Replies:
    11
    Views:
    719
  2. Askari
    Replies:
    2
    Views:
    707
    Askari
    Aug 30, 2004
  3. PhilC
    Replies:
    2
    Views:
    882
    PhilC
    Oct 25, 2004
  4. Csaba Gabor

    Pic and Viewport design question

    Csaba Gabor, Mar 22, 2005, in forum: Javascript
    Replies:
    12
    Views:
    145
  5. Replies:
    10
    Views:
    259
    Rick Johnson
    Mar 15, 2013
Loading...

Share This Page