home hardware prices news articles forums photos user reviews
Go Back   Tech Support Forums - TechIMO.com > PC Hardware and Tech > Webmastering and Programming
Ask a Tech Support Question (free)!

Scrollbar Color For Iframes

Reply
Get bargains at  »  Dealighted.com
 
Thread Tools Search this Thread
Currently Active Users: 2144
Discussions: 200,948, Posts: 2,379,397, Members: 246,309
Old May 2nd, 2004, 05:32 AM   Digg it!   #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>
magicz69 is offline   Reply With Quote
Old 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.
sice is offline   Reply With Quote
Old May 2nd, 2004, 06:55 AM     #3 (permalink)
Member
 
Carl-cox-'s Avatar
 
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 :/
__________________
http://www.coxeh.com
Carl-cox- is offline   Reply With Quote
Old May 2nd, 2004, 11:53 AM     #4 (permalink)
Member
 
Join Date: May 2004
Posts: 54
still cant funny ...
magicz69 is offline   Reply With Quote
Old May 2nd, 2004, 01:26 PM     #5 (permalink)
nuisance since 1968
 
OuTpaTienT's Avatar
 
Join Date: Oct 2001
Location: ɐqɟs
Posts: 10,457
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.
__________________
OIC 0utpatient.com
OuTpaTienT is offline   Reply With Quote
Old 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
magicz69 is offline   Reply With Quote
Old 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?
raggario is offline   Reply With Quote
Old 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
Tryezz is offline   Reply With Quote
Old 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.
raggario is offline   Reply With Quote
Old 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.
peejay is offline   Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Most Active Discussions
Making Health Care Worse (172)
The disrespect of Obama by Russian .. (22)
Is It Just Me? (2935)
Wireless Televisions. (12)
windows 7 problem (7)
CPU fan stops spinning randomly (8)
Regular Build (6)
Is the PSU I received dead? (12)
radeon x850xt platinum & shader.. (5)
Print spooler problem (15)
HIS HD5770 graphic card question (15)
windows vista security holes (9)
Install XP pro and a Vista laptop ?.. (11)
Dept. of HS: NSA 'Helped' Develop V.. (15)
Recent Discussions
How to convert MP3's (4)
Wireless Televisions. (12)
Graphics Card Upgrade Question (3)
Laptop with wireless problem. (2)
Internet Lost (1)
Hp Artist Edition + Matching Bag (0)
My monitor won't turn on after instal.. (0)
Asus P4G8X Mobo (6)
radeon x850xt platinum & shader 3 (5)
Xbox 360 GTA: SA disk error (1)
Is the PSU I received dead? (12)
windows 7 internet problem (5)
Multiple Restarts Required at Boot (0)
BSOD On Startup (ntoskrnl.exe) (2)
Print spooler problem (15)
Have you switched yet? (86)
screen resolution vs monitor size (2)
sms storage to PC (0)
Regular Build (6)
Open With ..... Win7 (0)
java code for fibonacci (1)
[F@H SPAM 11/16/09] ! 1/2 months to r.. (35)
windows 7 problem (7)
CPU fan stops spinning randomly (8)
Partition Magic caused HDD problem (3)


All times are GMT -4. The time now is 08:54 PM.
TechIMO Copyright 2009 All Enthusiast, Inc.



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28