SitePoint Sponsor

User Tag List

Results 1 to 13 of 13

Thread: CSS error

  1. #1
    Non-Member hyperimage's Avatar
    Join Date
    Dec 2003
    Location
    Croatia
    Posts
    259
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    CSS error

    hi i tryed to validate my css at w3c css validator and it gives me allways an error for scrollbar style!!!
    example: property scroolbar-track-color:#336699; doesnt esist!!!!!
    the url is www.on-lineportal.com/sm
    any suggestion
    thanx in advance
    cya

  2. #2
    SitePoint Zealot
    Join Date
    Oct 2003
    Location
    USA
    Posts
    173
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    scrollbar is not valid CSS.
    .
    2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
    2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
    2 | 3 | 4 | 5 | 6 | 7 | 8 | 9

  3. #3
    Non-Member hyperimage's Avatar
    Join Date
    Dec 2003
    Location
    Croatia
    Posts
    259
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    suggestions?

    Quote Originally Posted by Redhat_PHP
    scrollbar is not valid CSS.
    then how i can have a colored scrollbar with regular css?
    thanx

  4. #4
    SitePoint Wizard silver trophy
    Join Date
    May 2003
    Posts
    1,843
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ::: certified wild guess :::

  5. #5
    Non-Member hyperimage's Avatar
    Join Date
    Dec 2003
    Location
    Croatia
    Posts
    259
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    still the same css error

    maybe somebody know some javascript called function for colorize the scrollbar without css error displaying?
    thanx

  6. #6
    SitePoint Wizard silver trophy
    Join Date
    May 2003
    Posts
    1,843
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hard to tell what you want. Are you scripting this? Can't use hyphens in JS:
    Code:
    function qualcosa()
    {
        if (window.createPopup)
            document.getElementsByTagName('body').item(0).style.scrollbarTrackColor = '#336699';
    }
    Would be IE-only.
    ::: certified wild guess :::

  7. #7
    Non-Member hyperimage's Avatar
    Join Date
    Dec 2003
    Location
    Croatia
    Posts
    259
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    e possibile qualcosa come questo

    <script type="javascript">
    function colorscrollbar() {
    scrollbar-face-color:#8080FF;
    scrollbar-arrow-color:#FFFFFF;
    scrollbar-track-color:#DDDDFF;
    scrollbar-shadow-color:'';
    scrollbar-highlight-color:'';
    scrollbar-3dlight-color:'';
    scrollbar-darkshadow-Color:'';
    }
    </script>

    <body onload="colorscrollbar();">

  8. #8
    ☆★☆★ silver trophy vgarcia's Avatar
    Join Date
    Jan 2002
    Location
    in transition
    Posts
    21,235
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    I fail to see the point in having valid CSS if you want IE-only effects.

  9. #9
    Non-Member hyperimage's Avatar
    Join Date
    Dec 2003
    Location
    Croatia
    Posts
    259
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    ok

    tell me the way to have css ok and to see in all browsers
    thanx in advance

  10. #10
    SitePoint Zealot
    Join Date
    Jan 2003
    Location
    Las Vegas
    Posts
    180
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by hyperimage
    tell me the way to have css ok and to see in all browsers
    thanx in advance
    Wow.

  11. #11
    ☆★☆★ silver trophy vgarcia's Avatar
    Join Date
    Jan 2002
    Location
    in transition
    Posts
    21,235
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by hyperimage
    tell me the way to have css ok and to see in all browsers
    thanx in advance
    The main purposes of having valid CSS are:
    1. To ensure that your code works in the most user agents possible, and
    2. To ease maintenance by only having to look in one or a couple of files to change your layout.

    What you're essentially asking is to get validation for CSS attributes that are nonstandard and only work in one or two browsers. You then go further by saying you want to hide your invalid CSS by using Javascript to do so. Using the scrollbar CSS defeats purpose #1 listed above, and using Javascript to fool validation defeats both purposes. I ask again, why do you need this CSS to validate? It's a waste of time if you're validating for validation's sake and not reaping any benefits for it.

  12. #12
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,556
    Mentioned
    183 Post(s)
    Tagged
    6 Thread(s)
    Hi,

    I agree with everything Vinnie says so it pains me to offer this solution

    Wrap the proprietary IE code in IE's conditional comments in the head of your document and it won't be parsed by the validator.
    <!--[if gte IE 5]>
    <style type="text/css">
    html,body {
    scrollbar stuff etc........
    }
    </style>
    <![endif]-->

    The only reason for this could be when you have a client who wants scrollbars and wants it validated and is ignorant. (Don't tell him/her I said that.)

    Otherwise as Vinnie said why bother. You are using invalid code that only works in IE therefore you can't expect to validate can you

    Paul

  13. #13
    Non-Member hyperimage's Avatar
    Join Date
    Dec 2003
    Location
    Croatia
    Posts
    259
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Paul O'B
    The only reason for this could be when you have a client who wants scrollbars and wants it validated and is ignorant. (Don't tell him/her I said that.)
    now u understand me!!! hehehe there is someone who want scrollbar and a validate css!!!


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
  •