Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 03-10-2005, 01:23 AM   PM User | #1
Pandaemonaeon
New Coder

 
Join Date: Feb 2005
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Pandaemonaeon is an unknown quantity at this point
How do I use two styles in one page?

I have two scrollbars in a single page (one for a layer, one for the whole document) and I plan on using two different colored scrollbars. How do I do that?
Pandaemonaeon is offline   Reply With Quote
Old 03-10-2005, 01:43 AM   PM User | #2
_Aerospace_Eng_
Supreme Master coder!


 
_Aerospace_Eng_'s Avatar
 
Join Date: Dec 2004
Location: In a place far, far away...
Posts: 19,293
Thanks: 2
Thanked 1,044 Times in 1,020 Posts
_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light
give a class or id to the the element that you want to apply the scrollbar colors to then in the css define the colors under that specific class or element, mind you that scrollbar colors only work in IE/PC and maybe one other browser, and then define the colors for the html element in css
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Scrollbar colors</title>
<style type="text/css">
<!--
html {
scrollbar-3dlight-color : #FFFFFF;
scrollbar-arrow-color : #FFFFFF;
scrollbar-base-color : #000000;
scrollbar-darkshadow-color : #000000;
scrollbar-face-color : #FF0000;
scrollbar-highlight-color : #FFFFFF;
scrollbar-shadow-color : #CCCCCC;
scrollbar-track-color : #000000;
}
div#content {
height:300px;
width:300px;
margin:auto;
overflow:auto;
scrollbar-3dlight-color : #FFFFFF;
scrollbar-arrow-color : #FFFFFF;
scrollbar-base-color : #000000;
scrollbar-darkshadow-color : #000000;
scrollbar-face-color : #0000FF;
scrollbar-highlight-color : #FFFFFF;
scrollbar-shadow-color : #CCCCCC;
scrollbar-track-color : #000000;
}
-->
</style>
</head>

<body>
<div id="content">your text here</div>
</body>
</html>
EDIT:fixed typo thanx jalenack

Last edited by _Aerospace_Eng_; 03-10-2005 at 05:40 AM..
_Aerospace_Eng_ is offline   Reply With Quote
Old 03-10-2005, 01:48 AM   PM User | #3
Jalenack
Regular Coder

 
Join Date: May 2004
Location: Berkeley, California Age: 15
Posts: 398
Thanks: 0
Thanked 0 Times in 0 Posts
Jalenack is an unknown quantity at this point
_Aerospace_Eng_, there is a small but very important typo in your code:

overflow: auto


Generally, its bad form to color a user's scrollbars. This has been discussed many times before at this forum, so do a search on scrollbars and see what you find.
__________________
Jalenack.com .:. YWDA Founder .:. Rounded Corners Maker 1.1! .:. My Blog
The hardest thing about teaching is not knowing the right answers, but knowing the right questions - Elisabeth Klein
Pretty buttons does not a great website make.
Jalenack is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 08:29 AM.


Advertisement
Log in to turn off these ads.