SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Enthusiast
    Join Date
    Mar 2004
    Location
    Farmington
    Posts
    80
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    iframe custom scrollbar color

    I have an iframe with scrolling as 'auto' so the scrollbar appears automatically depending on the content. I have a custom scrollbar for the iframe using the following CSS.

    BODY
    {
    SCROLLBAR-FACE-COLOR: #AEAEAE;
    SCROLLBAR-HIGHLIGHT-COLOR: #000000;
    SCROLLBAR-SHADOW-COLOR: #000000;
    SCROLLBAR-3DLIGHT-COLOR: #000000;
    SCROLLBAR-ARROW-COLOR: #ffffff;
    SCROLLBAR-TRACK-COLOR: #000000;
    SCROLLBAR-DARKSHADOW-COLOR: #000000;
    }

    The custom scrollbar works great for the iframe when there is content spanning more than the height of the iframe in Internet Explorer. But it does not work in firefox. Also, there is one more issue in IE. When the content is less than the height of the iframe, the custom scroll bar does not appear but rather a place holder for the scroll bar (even if I set scrolling to 'yes', same issue). I am OK with the place holder but I would like the background color for the scrollbar placeholder to be black instead of the default white. How do I fix these issues ? Thanks for any help.

  2. #2
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,729
    Mentioned
    104 Post(s)
    Tagged
    4 Thread(s)
    The custom scrollbars are IE specific, so they won't be custom in Firefox/Chrome/Safari/Opera/...

    I am not aware of any way to adjust the color of the scrollbar placeholder.
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript

  3. #3
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,875
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by pmw57 View Post
    so they won't be custom in Firefox/Chrome/Safari/Opera/...
    Opera actually does have an option you can turn on so it recognises the custom IE scrollbar colours so it is possible in Opera if you can convince people to turn it on in that browser.

    You are more likely to find people turning it off in IE than turning it on in Opera. I have it off in all browsers on my computer.
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">


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
  •