Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 7 of 7
  1. #1
    Regular Coder
    Join Date
    Jan 2004
    Location
    USA
    Posts
    364
    Thanks
    12
    Thanked 6 Times in 6 Posts

    Unhappy scrollbar colors don't work with doctype

    The scrollbar colors don't work on my site when i add this to it:


    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">


    The page code is this:


    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <title>site</title>

    <META NAME="keywords" CONTENT="pictures...">
    <META NAME="description" CONTENT="stuff">
    <META NAME="author" CONTENT="me">
    <META NAME="generator" CONTENT="NoteTab Light">
    <META NAME="copyright" CONTENT="&copy; 2004 me">
    <META HTTP-EQUIV="imagetoolbar" CONTENT="no">

    <link rel="StyleSheet" href="main.css" type="text/css">

    </head>

    <body>

    <!-- begin main table -->
    <table class="tablemain" cellpadding="10" width="750">

    <tr>
    <td width="700" height="100">
    <center><img width="550" height="100" src="logo1.gif" ALT="logo"></center>
    </td>
    </tr>

    <tr>
    <td height="800">
    testing...
    </td>
    </tr>


    </table>
    <!-- end main table -->

    </body>

    </html>


    but the scrollbars DO work when i have this:


    <html>
    <head>

    <link rel="StyleSheet" href="sfxmain.css" type="text/css">

    </head>
    <body>
    </body>
    </html>


    css (part of it) :

    body {
    background: #292929;
    font-family: Tahoma, Verdana, sans-serif;
    font-size: 10pt;
    color: black;
    cursor: url(cursorurl.cur);

    /* begin scrollbar code */
    scrollbar-face-color: silver;
    scrollbar-shadow-color: #292929;
    scrollbar-highlight-color: #292929;
    scrollbar-3dlight-color: #444444;
    scrollbar-darkshadow-color: #292929;
    scrollbar-track-color: #292929;
    scrollbar-arrow-color: #292929;
    /* end scrollbar code */

    }

  • #2
    Regular Coder Skyzyx's Avatar
    Join Date
    Aug 2002
    Location
    Silicon Valley, CA
    Posts
    980
    Thanks
    0
    Thanked 0 Times in 0 Posts
    That's because scrollbar coloring is invalid CSS. It's a proprietary hack that was added by Microsoft for Internet Explorer that is a violation of the standards set up by the W3C... the group that invented HTML and such.

    It is also considered by many to be a usability and accessibility nightmare. Personally, I think it's bad form for this site to utilize it.

    You can either write good clean code, or you can write invalid CSS code for the scrollbars in IE/Win.

    This topic has been discussed at great length. Perhaps you should try the search feature next time.
    Coloring scrollbars, views and opinions.
    the scrollbar and colors
    custom scrollbar not working
    Customizing scrollbar color in iframe?
    scroll bar css
    Change color of scrollbars...

    Creator of SimplePie and Tarzan AWS, co-founder of WarpShare, co-built the Y! Messenger website, usability-focused, and an INFJ personality.

  • #3
    Regular Coder
    Join Date
    Jan 2004
    Location
    USA
    Posts
    364
    Thanks
    12
    Thanked 6 Times in 6 Posts
    thanks, and i'll just have to decide if i want clean code or colored scrollbars.

    also, why do the scrollbar colors appear when there is no doctype thing?

  • #4
    Senior Coder missing-score's Avatar
    Join Date
    Jan 2003
    Location
    UK
    Posts
    2,194
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Im assuming its becuase when you set the doctype you are loading the CSS specification which would not include the invalid CSS.

  • #5
    me'
    me' is offline
    Senior Coder
    Join Date
    Nov 2002
    Location
    Warwickshire, England
    Posts
    1,229
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Originally posted by qwertyuiop
    thanks, and i'll just have to decide if i want clean code or colored scrollbars.

    also, why do the scrollbar colors appear when there is no doctype thing?
    On which browser? No DOCTPYE sends IE into 'Quirks-mode', which displays things funnily, and has more bugs than if you include a doctype.
    David House - Perfect is achieved, not when there is nothing left to add, but when there is nothing left to take away. (Antoine de St. Exupery).
    W3Schools | XHTML Validator | CSS Validator | Colours | Typography | HTML&CSS FAQ | Go get Mozilla Now | I blog!

  • #6
    Master Coder
    Join Date
    Feb 2003
    Location
    Umeå, Sweden
    Posts
    5,575
    Thanks
    0
    Thanked 83 Times in 74 Posts
    The reason is that the viewport is thecontainer for the body element in quirks mode and the container for the html element in standards mode - and nothing else. Iew does not have better CSS support in standards mode then in quirks mode (with the exception of the box model) it is just less lax in parsing the CSS.
    liorean <[lio@wg]>
    Articles: RegEx evolt wsabstract , Named Arguments
    Useful Threads: JavaScript Docs & Refs, FAQ - HTML & CSS Docs, FAQ - XML Doc & Refs
    Moz: JavaScript DOM Interfaces MSDN: JScript DHTML KDE: KJS KHTML Opera: Standards

  • #7
    Regular Coder
    Join Date
    Jan 2004
    Location
    USA
    Posts
    364
    Thanks
    12
    Thanked 6 Times in 6 Posts
    ok, thanks for the background info, all of you


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •