<!DOCTYPE> and CSS Scroll bar

Discussion in 'HTML' started by The Numerator, Mar 25, 2006.

  1. Here's the dilemma:

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <head>
    <title>Text</title>
    <link href="styles/default.css" rel="stylesheet" type="text/css">
    </head>
    <body>
    <p>text</p>
    </body>
    </html>

    And in "styles/default.css", I have this:

    body {
    scrollbar-face-color: #123456
    // more scrollbar properties
    // ...
    }

    But, the scrollbar doesn't work. Then I took the DOCTYPE off, and it
    worked, but the body was all messed up... Could someone tell me whats
    going on and a offer a possible alternative? Thanks.
    The Numerator, Mar 25, 2006
    #1
    1. Advertising

  2. The Numerator

    kchayka Guest

    The Numerator wrote:
    >
    > body {
    > scrollbar-face-color: #123456
    >
    > But, the scrollbar doesn't work.


    I don't see it as a problem. Thankfully I use a browser that doesn't
    support scrollbar styling in the first place. :)

    Do your visitors a favor and leave their browser UI alone, eh?

    --
    Reply email address is a bottomless spam bucket.
    Please reply to the group so everyone can share.
    kchayka, Mar 25, 2006
    #2
    1. Advertising

  3. While the city slept, The Numerator () feverishly
    typed...

    > Here's the dilemma:
    >
    > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"


    [...]

    It is now the 21st Century... try "Strict" ;-)

    Cheers,
    Nige

    --
    Nigel Moss http://www.nigenet.org.uk
    Mail address will bounce. | Take the DOG. out!
    "Your mother ate my dog!", "Not all of him!"
    nice.guy.nige, Mar 26, 2006
    #3
  4. On 25 Mar 2006 14:19:33 -0800, "The Numerator" <>
    wrote:

    >Here's the dilemma:
    >
    ><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    >"http://www.w3.org/TR/html4/loose.dtd">
    ><head>
    ><title>Text</title>
    ><link href="styles/default.css" rel="stylesheet" type="text/css">
    ></head>
    ><body>
    ><p>text</p>
    ></body>
    ></html>
    >
    >And in "styles/default.css", I have this:
    >
    >body {
    > scrollbar-face-color: #123456
    > // more scrollbar properties
    > // ...
    >}
    >
    >But, the scrollbar doesn't work. Then I took the DOCTYPE off, and it
    >worked, but the body was all messed up...


    I don't think I've met any browser that could mess up <p>text</p>
    And what size window are you using that this produces a scroll-bar?

    > Could someone tell me whats
    >going on


    You're (a) using Internet Explorer and (b) doing something else you
    haven't told us.

    >and a offer a possible alternative?


    Two: (1) Opera (2) Firefox.

    Oh, and don't bother trying to style scrollbars.

    --
    Stephen Poley

    http://www.xs4all.nl/~sbpoley/webmatters/
    Stephen Poley, Mar 26, 2006
    #4
  5. The Numerator wrote:

    > Here's the dilemma:
    >
    > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    > "http://www.w3.org/TR/html4/loose.dtd">
    > <head>
    > <title>Text</title>
    > <link href="styles/default.css" rel="stylesheet" type="text/css">
    > </head>
    > <body>
    > <p>text</p>
    > </body>
    > </html>
    >
    > And in "styles/default.css", I have this:
    >
    > body {
    > scrollbar-face-color: #123456
    > // more scrollbar properties
    > // ...
    > }
    >
    > But, the scrollbar doesn't work. Then I took the DOCTYPE off, and it
    > worked, but the body was all messed up... Could someone tell me whats
    > going on and a offer a possible alternative? Thanks.


    Please leave my scroll bar alone. It is bad enough when people screw around
    with my fonts and try to adjust my window sizes. On the other hand, I have
    set my browser to ignore most attempts to control beyond the viewport, so I
    am probably immune to your attempts here.

    Since I don't want other people manipulating my scroll bar, I haven't tried
    to manipulate anyone else's. I can't help you with this one. Good luck!

    Carolyn
    --
    Carolyn Marenger
    Carolyn Marenger, Mar 26, 2006
    #5
  6. The Numerator wrote:
    > Here's the dilemma:
    >

    [snip code]
    >
    > But, the scrollbar [coloring] doesn't work. Then I took the DOCTYPE off, and it
    > worked, but the body was all messed up... Could someone tell me whats
    > going on and a offer a possible alternative? Thanks.


    Although I hardly agree with the bickering style of some of the responses you got, they
    are in their essence right:
    1) don't mess with user's browser
    2) use standard css - scrollbar-face-color is not

    Number one could be subject to debate, but not being standards-compliant is indeed what's
    causing you trouble. If you include the DOCTYPE, browsers try to follow the standards, and
    this also means ignoring the scrollbar-face-color directive. If you omit the DOCTYPE,
    browsers jump into "quirks mode", allowing non-standard extension, but also behaving
    strange in other ways - that's why the rest of the page gets garbled.

    See http://www.quirksmode.org/index.html?/css/quirksmode.html for more.
    Mitja Trampus, Mar 26, 2006
    #6
  7. The Numerator wrote:
    > Here's the dilemma:
    >
    > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    > "http://www.w3.org/TR/html4/loose.dtd">
    > <head>
    > <title>Text</title>
    > <link href="styles/default.css" rel="stylesheet" type="text/css">
    > </head>
    > <body>
    > <p>text</p>
    > </body>
    > </html>
    >
    > And in "styles/default.css", I have this:
    >
    > body {
    > scrollbar-face-color: #123456
    > // more scrollbar properties
    > // ...
    > }
    >
    > But, the scrollbar doesn't work. Then I took the DOCTYPE off, and it
    > worked, but the body was all messed up... Could someone tell me whats
    > going on and a offer a possible alternative? Thanks.
    >


    In plain English, scrollbar-face-color is not a legal style property in
    either CSS1 or CSS2.1.

    --

    David E. Ross
    <http://www.rossde.com/>

    Concerned about someone (e.g., Pres. Bush) snooping
    into your E-mail? Use PGP.
    See my <http://www.rossde.com/PGP/>
    David E. Ross, Mar 26, 2006
    #7
  8. On 26/03/2006 14:38, Mitja Trampus wrote:

    [snip]

    > If you include the DOCTYPE, browsers try to follow the standards,


    True.

    > and this also means ignoring the scrollbar-face-color directive.


    That isn't the case for IE, though it would appear to be for Opera.

    [snip]

    Mike

    --
    Michael Winter
    Prefix subject with [News] before replying by e-mail.
    Michael Winter, Mar 26, 2006
    #8
  9. Michael Winter wrote:
    > On 26/03/2006 14:38, Mitja Trampus wrote:
    >
    > [snip]
    >
    >> If you include the DOCTYPE, browsers try to follow the standards,
    >> and this also means ignoring the scrollbar-face-color directive.

    >
    > That isn't the case for IE, though it would appear to be for Opera.


    I stand corrected :)
    I wrote that without testing it, relying on OT saying that he doesn't get colored
    srollbars if he removes the doctype. Apparently he does care about Opera...

    I should perhaps also have mentioned that scrollbar-face-color is a no-go with
    Firefox/Mozilla/Netscape.
    Mitja Trampus, Mar 26, 2006
    #9
  10. Thanks...
    The Numerator, Mar 27, 2006
    #10
  11. The Numerator

    Arne Guest

    Arne, Mar 27, 2006
    #11
  12. The Numerator

    Guest

    use the html tag in the standards mode instead of the body tag

    html {
    scrollbar rule goes here
    }
    , Mar 30, 2006
    #12
    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. George
    Replies:
    4
    Views:
    482
    George
    Feb 13, 2004
  2. Matt
    Replies:
    0
    Views:
    3,525
  3. John Hann
    Replies:
    0
    Views:
    6,042
    John Hann
    Aug 21, 2004
  4. Matt
    Replies:
    9
    Views:
    70,765
  5. Larry Lindstrom
    Replies:
    19
    Views:
    1,268
    Jonathan N. Little
    Jun 12, 2012
Loading...

Share This Page