Forum Moderators: not2easy

Message Too Old, No Replies

changing the color of the scrollbar on an IFRAME

how to do it?

         

rfung

9:02 pm on Jan 17, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



i have an iframe that 'may' have a scroll bar (if the content is longer than the frame size. when the content fits on the iframe, I still see on the right side(vertical scrollbar) the space where the scrollbar would be in white (the iframe is in a different color). two questions:

1) can i change that white space to match the color of the frame

2) when the content is too big,and I do show a scrollbar, how to change the color of the scrollbar?

TheDave

12:57 pm on Jan 18, 2004 (gmt 0)

10+ Year Member



I think you should be able to, but you will probably need to style it inside the iframe source file, not in the page that calls it. So you should put this in the head of the iframe src file:

body
{
scrollbar-face-color: #000000;
scrollbar-highlight-color: #000000;
scrollbar-3dlight-color: #000000;
scrollbar-darkshadow-color: #000000;
scrollbar-shadow-color: #000000;
scrollbar-arrow-color: #000000;
scrollbar-track-color: #000000;
}

seankelly

8:44 pm on Jan 26, 2004 (gmt 0)

10+ Year Member



Yes I agree with 'thedave', and it would need to be enclosed in <style> ... </style> tags in the <head> section like this:

<html>
<head>
<title>My Page</title>
<style>
body
{
scrollbar-face-color: #000000;
scrollbar-highlight-color: #000000;
scrollbar-3dlight-color: #000000;
scrollbar-darkshadow-color: #000000;
scrollbar-shadow-color: #000000;
scrollbar-arrow-color: #000000;
scrollbar-track-color: #000000;
}
</style>
</head>
<body>
Hello World!
</body>
</html>

Hope this helps!
Sean Kelly,

[edited by: tedster at 11:47 pm (utc) on Feb. 5, 2004]
[edit reason] remove urls [/edit]

TheDave

10:29 am on Jan 27, 2004 (gmt 0)

10+ Year Member



They're pretty good on editing links out of sigs around here, so that was pretty pointless ;)Especially since the thread is about a month old...

Purple Martin

12:24 am on Jan 28, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



rfung - one thing to be aware of is that scrollbar colors only work in IE. Other browsers just show normal scrollbars.

seankelly - one thing to be aware of is that Webmaster World has strict rules about not advertising personal sites. Please read the Terms of Service for more information:
[webmasterworld.com...]

seankelly

6:01 pm on Jan 28, 2004 (gmt 0)

10+ Year Member



Ok, sorry.

mattr555

12:28 pm on Mar 10, 2004 (gmt 0)

10+ Year Member



also to note, those scrollbar style only work in IE in Quirks mode. If you declare a doctype they dont work.