May 2nd, 2004, 05:32 AM
|
#1 (permalink)
| | Member
Join Date: May 2004
Posts: 54
| Scrollbar Color For Iframes
How do i change the scrollbar color of iframe ? i tried putting this on the main page and the source page but the scrollbard color still did nt change ..
<style type="text/css">
body
{
scrollbar-face-color:#FEEECC;
scrollbar-arrow-color:black;
scrollbar-track-color:#FEEECC;
scrollbar-shadow-color:#FEEECC;
scrollbar-highlight-color:#FEEECC;
scrollbar-3dlight-color:#FEEECC;
scrollbar-darkshadow-Color:#FEEECC;
background: transparent;
overflow: hidden;
border:none;
margin:0;
}
</style> |
| |
May 2nd, 2004, 06:10 AM
|
#2 (permalink)
| | Member
Join Date: Mar 2004
Posts: 75
|
just a few things to check:
1. colored scrollbars only work in IE
2. make sure you didnt set your doctype to xhtml
3. im not sure if an html 4.01 STRICT doctype will allow it, so if youre using that, try setting it to transitional.
hope that helps. |
| |
May 2nd, 2004, 06:55 AM
|
#3 (permalink)
| | Member
Join Date: Nov 2002 Location: Kent England
Posts: 395
|
try putting
<style type="text/css">
.iframe
{
scrollbar-face-color:#FEEECC;
scrollbar-arrow-color:black;
scrollbar-track-color:#FEEECC;
scrollbar-shadow-color:#FEEECC;
scrollbar-highlight-color:#FEEECC;
scrollbar-3dlight-color:#FEEECC;
scrollbar-darkshadow-Color:#FEEECC;
background: transparent;
overflow: hidden;
border:none;
margin:0;
}
</style>
Then in your iframe tag put
<iframe class="iframe"></iframe>
i think thats how its done :/ |
| |
May 2nd, 2004, 11:53 AM
|
#4 (permalink)
| | Member
Join Date: May 2004
Posts: 54
| |
| |
May 2nd, 2004, 01:26 PM
|
#5 (permalink)
| | ᅟᅠ
Join Date: Oct 2001 Location: ɐqɟs
Posts: 10,449
|
Maybe that's a sign from above that you shouldn't do it.  Personally I don't like it when web sites try to change my scrollbar colors. It's annoying and I usually do not bookmark such web sites. |
| |
May 2nd, 2004, 07:35 PM
|
#6 (permalink)
| | Member
Join Date: May 2004
Posts: 54
|
but matching the background will look cool :P espicially for iframes :P i'll go look for solutions den |
| |
December 1st, 2004, 12:55 AM
|
#7 (permalink)
| | Junior Member
Join Date: Nov 2004
Posts: 13
|
You can put that css code onto the pages that get loaded into the iframe, then the iframe itself will appear to have the colored scrollbars, but it will really be the pages that get loaded that have the code and the coloring.
I found this thread though because I was searching for "doctype scrollbar color" in google. As mentioned above - different browsers don't allow scrollbar coloring, plus every time I try to use a doctype on a page that has scrollbar coloring the code won't work anymore..
Is there a proper doctype to use if you want to use the scrollbar coloring? Which doctype will not "break" that css code? |
| |
December 1st, 2004, 02:20 PM
|
#8 (permalink)
| | Junior Member
Join Date: Oct 2004
Posts: 23
|
<style type="text/css">
*<!--*
body
{
scrollbar-face-color:#FEEECC;
scrollbar-arrow-color:black;
scrollbar-track-color:#FEEECC;
scrollbar-shadow-color:#FEEECC;
scrollbar-highlight-color:#FEEECC;
scrollbar-3dlight-color:#FEEECC;
scrollbar-darkshadow-Color:#FEEECC;
background: transparent;
overflow: hidden;
border:none;
margin:0;
}
*-->*
</style>
The parts in the astrieks are the parts you need. That blocks off the code and makes it register.
"But hey, don't take my word for it"-The guy from reading rainbow |
| |
December 2nd, 2004, 04:07 AM
|
#9 (permalink)
| | Junior Member
Join Date: Nov 2004
Posts: 13
|
Tryezz, I should have been more specific in what I was looking for.
I had already been using similar code to what you had posted and that worked just fine for me, that is it worked fine on all pages that did not have the "xhtml" doctype. On my xhtml doctype pages, the scrollbar color code was no longer working.
I've been searching around though, and have just found the answer to what I was looking for. I will share my results with everyone here, and by the way these results were found at the forums on Devshed Right Here. Quote: |
Originally Posted by rsi on Devshed
In xhtml (standards mode ie), the scrollbar object is not part of the body element anymore...but the of the html element.
so:
html {
scrollbar-face-color: #96A096;
scrollbar-shadow-color: #96A096;
scrollbar-highlight-color: #96A096;
scrollbar-3dlight-color: #9AB6C4;
scrollbar-darkshadow-color: #20253A;
scrollbar-track-color: #738278;
scrollbar-arrow-color: #000000;
}
...works fine ! | And right in the same thread: Quote: |
Originally Posted by Tuxie on Devshed
I quote W3C: Quote: |
Some browsers (IE, Konqueror) have recently started supporting the non-standard properties 'scrollbar-shadow-color', 'scrollbar-track-color' and others. These properties are illegal: they are neither defined in any CSS specification nor are they marked as proprietary (by prefixing them with "-vendor-").
|
So,you shouldnt be using colored scrollbars at all,especially if you are using XHTML because its invalid XHTML. | So until I learn more about why I shouldn't be using this scrollbar coloring in my "xhtml" pages, I'm going to go ahead and use it anyway..
I am of the mind that scrollbar coloring should be optional for designers. Unfortunately some designers have a poor taste of how to use colors, and end up making poor looking pages that give colored scrollbars a bad name..
As usual, I hope my post is beneficial to the collective. |
| |
December 22nd, 2004, 05:30 AM
|
#10 (permalink)
| | Junior Member
Join Date: Dec 2004
Posts: 1
| raggario
i came across this post from google.. just wanted to say thanks for posting your solution and the info behind it.  |
| | |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | | |
Posting Rules
| You may post new threads You may post replies You may not post attachments You may not edit your posts HTML code is Off | | | | Most Active Discussions | | | | | Recent Discussions  | | | | | |