Page 1 of 2 12 LastLast
Results 1 to 10 of 19

Thread: XP Scrollbar Colouring

  1. #1
    Join Date
    Nov 2005
    Location
    Texas
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default XP Scrollbar Colouring

    I have always used the same code whenever customizing the colour of a scrollbar, but I have never had an XP computer to test my sites on until now.
    When I added in the code for the scrollbar colour it changed the traditional XP style scrollbar to the windows 2000/98 scrollbar style.
    Here's the code, does anyone know why this is? And if there's a way to fix that.

    <style type="text/css">
    <!--
    body
    {
    scrollbar-arrow-color: 000000;
    scrollbar-track-color: 000000;
    scrollbar-face-color: 000000;
    scrollbar-highlight-color: 000000;
    scrollbar-3dlight-color: 000000;
    scrollbar-darkshadow-color: 000000;
    scrollbar-shadow-color: 000000;
    }
    -->
    </style>


    And one more question, is there a way to customize the style of the scrollbar without using Flash? Somehow Im doubting that there is, because I haven't seen it done yet.

  2. #2
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Code:
    <style type="text/css">
    <!--
    body
    {
    scrollbar-arrow-color: 000000;
    scrollbar-track-color: 000000;
    scrollbar-face-color: 000000;
    scrollbar-highlight-color: 000000;
    scrollbar-3dlight-color: 000000;
    scrollbar-darkshadow-color: 000000;
    scrollbar-shadow-color: 000000;
    }
    -->
    </style>
    I was going to go through and highlight invalid CSS, then realized it would be easier to highlight the valid code, since there were only five lines of it.

    Scrollbar-colour code is proprietary and IE-only. Only users of one browser out of many will so much as see the effects of your code. Is that really worth invalidating your CSS for? I wouldn't really worry about minor style differences under the glare of so much bigger a problem.

    Numerical colour values should start with a hash (#), and SGML comment delimiters have no business being inside a stylesheet. Javascript makes provision for this by declaring <!-- a line-comment marker; CSS doesn't.
    Here's the code, does anyone know why this is? And if there's a way to fix that.
    It is because XP scrollbars have their colours hard-coded, and can't be changed. But what makes you think it's broken? If anything, I'd say it's an improvement over the standard Teletubby-style XP decorations.
    is there a way to customize the style of the scrollbar without using Flash?
    No. But it can be replaced using DHTML. Search for "scroller" here on DD.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  3. #3
    Join Date
    Dec 2004
    Location
    UK
    Posts
    2,358
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by Twey
    Javascript makes provision for this by declaring <!-- a line-comment marker; CSS doesn't.
    Incorrect, though not something I'd recommend.

    Only markup should contain markup comment delimiters, and neither script not style element content has required 'hiding' in years.

    Mike

  4. #4
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Incorrect, though not something I'd recommend.
    Really? Firefox complains when it encounters <!-- in a CSS block.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  5. #5
    Join Date
    Dec 2004
    Location
    UK
    Posts
    2,358
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by Twey
    [CSS allows SGML comment declarations] Really?
    Yep. It's in the grammar. From the lexical rules:

    Code:
    "<!--" {return CDO;}
    "-->" {return CDC;}
    From the parser grammar:

    Code:
    stylesheet
      : [ CHARSET_SYM S* STRING S* ';' ]?
      [S|CDO|CDC]* [ import [S|CDO|CDC]* ]*
      [ [ ruleset | media | page | font_face ] [S|CDO|CDC]* ]*
    Firefox complains when it encounters <!-- in a CSS block.
    Firefox does complain about a lot, but I did say I don't recommend it.

    Mike

  6. #6
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Quote Originally Posted by mwinter
    Firefox does complain about a lot, but I did say I don't recommend it.
    And, it (Firefox) seems to complain more and more with each new version. It's getting uppity if you ask me. Is there anyway to get it to skip complaining (like the earlier versions skipped complaining) so much about things that don't break either the code or the page? I actually find this new information useful many times but, would love a toggle for when I just want to get right to the heart of the matter with a troublesome page.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  7. #7
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Is there anyway to get it to skip complaining (like the earlier versions skipped complaining) so much about things that don't break either the code or the page?
    Unfortunately, not. Great idea for an extension, though, along with some other Javascript console enhancements (seperation of JS info, CSS info, interface/extensions info, and perhaps a seperate console for each page). I'll do it if/when I have time.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  8. #8
    Join Date
    Dec 2004
    Location
    UK
    Posts
    2,358
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by jscheuer1
    Is there anyway to get it to skip complaining (like the earlier versions skipped complaining) so much about things that don't break either the code or the page?
    I know how to get it to complain more.

    Mike

  9. #9
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    I know that IE 5 will ignore anything after an open comment... probably not telling you something you don't know, though. But... just remember older browsers might not behave the same way...

  10. #10
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Quote Originally Posted by mwinter
    I know how to get it to complain more.

    Mike
    Depending upon what you mean by that, it could be useful for certain situations, could you elaborate please?

    Also, in working with a client, it recently came up about the (I believe it is the w3c standard) requirement for alt attributes for image tags, even if they are empty. We were both just wondering if there were any logical and/or practical reason for this? How much better is an empty alt attribute than none at all? I notice that this is a requirement for validation so again, what if any useful purpose does the empty alt attribute serve? I was stumped but, knew that if anyone would know, you would.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

Bookmarks

Posting Permissions

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