Forum Moderators: open

Message Too Old, No Replies

iframe scrollbars

         

mdwickes

7:57 pm on Jul 16, 2002 (gmt 0)



I have read forum posts about changing the scrollbar appearances with CSS, but none of the suggestions have helped. I want to change the colors using the body {scrollbar-color...etc} tag in the CSS stylesheet in the iframed page heading but it doesn't work. I have tried to add the effects using external stylesheets and on both the main page and iframed page but nothing happens. Also, is there a way to make the iframe page horizontal scrollbar disappear? The page is only about 600 pixels wide and no wider, but the scrollbar is added automatically as though the page was set to be 700 px wide. Any suggestions?

Knowles

8:01 pm on Jul 16, 2002 (gmt 0)

10+ Year Member



In your CSS for the iframed page make sure you set the width of the page to something smaller than 600, also if your iframe is only 600 it will force the horizontal scroll bar if you have a vertical one.

As far has the coloring of it, what browser are you using? I do beleive this is only supported by IE, not sure if this is your issue or not.

papabaer

8:59 pm on Jul 16, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hello mdwickes, welcome to Webmaster World!

I'm sure you already know that "colored scrollbars" are specific to MSIE 5.5 and IE6 (in quirk mode). The MS propriety CSS is not recognized by any other browers. IE6 in Web Standards compliant mode also ignores the propriety CSS.

I've used this techinque many times in the past and still have a number of pages (iframe w/colored scrollbars) that employ this style.

It is very simple to use and apply to your iframe page:

<style type="text/css">
body {
scrollbar-face-color: #300;
scrollbar-shadow-color: #600;
scrollbar-highlight-color: #600;
scrollbar-3dlight-color: #600;
scrollbar-darkshadow-color: #600;
scrollbar-track-color: #300;
scrollbar-arrow-color: pink;
}
</style>
</head>
<body>

You can use external css or simply embed it in the <head> content.

Keep in mind though, that if you apply a standards inducing doctype (good idea!) your colored scrollbars will not be displayed (IE6).

Knowles

9:03 pm on Jul 16, 2002 (gmt 0)

10+ Year Member



duh! I forgot to mention the doctype in my post.