Madu
Madu

Reputation: 21

change iframe scroll bar style

Is there any way to change the style of an iframe scroll bar?

Upvotes: 1

Views: 10065

Answers (2)

Robin Maben
Robin Maben

Reputation: 23054

You can also change it from chrome/safari.. (webkit based browsers)

::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3); 
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    border-radius: 10px;
    -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.5); 
}

See this article on the webkit blogs. And, the tutorial from where the above snippet was blatantly copied.

For, Mozilla Firefox and family, there's nothing yet. See this related SO question.

Upvotes: 2

cohen
cohen

Reputation: 621

I think you need to use a plugin that will let you do that, such as the following. http://www.net-kit.com/jquery-custom-scrollbar-plugins/

just so you know you cant do it with css: Iframe Scrollbar css

You can change it with css in IE apparantly. Change style scrollbar div for my site

Upvotes: 2

Related Questions