Forum Moderators: open

Message Too Old, No Replies

Scroll Bars on IFRAMES, newbie question....

Changing the scroll appreance.

         

Mully

10:13 pm on Dec 10, 2003 (gmt 0)

10+ Year Member



How do u change the style of the scroll bar on the iframe? Ive worked out how to change the scroll bar for the genral page in the <head></head> line, but cant figure out how to incorporate that into my central iframe. Any help would be much appreciated.

Dayo_UK

10:18 pm on Dec 10, 2003 (gmt 0)



In the code of the iframe:-

<STYLE type="text/css">
<!--
BODY {
scrollbar-face-color: 000066;
scrollbar-arrow-color: ffffff;
scrollbar-base-color: ffffcc;
}
-->
</STYLE>

Or obviously by calling the style sheet.

You will have to place the above code or the style sheet link in the iframe - not the parent frame. AFAIK

asquithea

10:34 pm on Dec 10, 2003 (gmt 0)

10+ Year Member



It's worth pointing out that this is IE specific code and will cause your site to fail W3C validation. There's also a strong argument to be made that a browser should render window widgets in the style of the OS for usability and accessibility reasons.

encyclo

10:57 pm on Dec 10, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If you're worried about validation and don't mind cheating a little, just use IE conditional comments to give the CSS to IE5.5 and up only, thus:

<!--[if IE 5.5]> 
<style type="text/css">
<!--
* {
scrollbar-face-color: 000066;
scrollbar-arrow-color: ffffff;
scrollbar-base-color: ffffcc;
}
-->
</style>
<![endif]-->

You'll sail through validation ;) I'm all for standards, but I have a weak spot when it comes to colored scrollbars...

Mully

5:54 pm on Dec 15, 2003 (gmt 0)

10+ Year Member



Cheers guys, much appreciated.

I just ended up changing the style sheet in the page it was pulling up instead. You've lost me with all the validation talk, im a newbie designer, so ill come to that when i have to :)

Thnx again.