Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using different Colors for buttons, and text areas, and dropdowns???

Status
Not open for further replies.

SPYDERIX

Technical User
Jan 11, 2002
1,899
CA
Hi,

I would like to know how to be able to specify differnt colors for buttons, text areas, and dropdowns.

#-1:
I want to be able to make buttons a different color and change the text color on the button

#-2:
I wanto to be able to change the background color in a text area, and change the color of the scrollbars in the text area.

#-3:
I want to be able to change the color of the background on dropdown menus, and change the text color in the dropdown.

Thanks, to anyone who can either tell me how to do this, or point me to a site that will show me how to do this.

Thanks
[deejay]
Nate
"If you're not living on the edge, you're taking up too much space!"
 
Hi mate,

Buttons..
.submit {
background-color: #660000;
color : #FCE8D1;
cursor: hand;
font-family: arial;
font-size: 10pt;
font-weight:bold;
}


Text box..

.textbox {
COLOR: #660000;
TEXT-DECORATION: none;
font-family: arial,helvetica,verdana;
font-size: 11pt;
font-weight: bold;
}


Select Menu..

.selectmenu {
font-size : 11px;
font-family : Verdana;
font-weight : bold;
background-color : beige;
}

Just add class="whatever_one_here" to the form tags..

Sorry I have not got more time to explain, I will answer in about 20 minutes if nobody else does..

Hope this helps Wullie

 
I tried this, but it didn't work:

<HTML>
<HEAD>
<TITLE>COLORS</TITLE>
</HEAD>
<BODY BGCOLOR=&quot;BLACK&quot;>
.submit
{
background-color: #FF0000;
color : #FCE8D1;
cursor: hand;
font-family: arial;
font-size: 10pt;
font-weight:bold;
}
<FORM>
<INPUT TYPE=&quot;BUTTON&quot; VALUE=&quot;ENTER&quot; CLASS=&quot;.submit&quot;>
</FORM>
</BODY>
</HTML>

what did I do wrong here? [deejay]
Nate
&quot;If you're not living on the edge, you're taking up too much space!&quot;
 
Cool, thanks.

Fast response. [deejay]
Nate
&quot;If you're not living on the edge, you're taking up too much space!&quot;
 
I would strongly recommend that you do NOT call your class &quot;submit&quot;. Call it &quot;submitbutton&quot; or anything else. It's VERY bad form, and potentially VERY dangerous, to use a reserved word for ANYTHING. If you don't believe it, try naming your submit button &quot;submit&quot;.
Tracy Dryden
tracy@bydisn.com

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard. [dragon]
 
One other thing:

How do you change the color of the drop down menu scrollbar?

This is what I tried:

<STYLE>
.selectmenu
{
font-size : 11px;
font-family : Verdana;
font-weight : bold;
background-color : black;
COLOR: #FFFFFF
scrollbar-arrow-color : GREEN;
scrollbar-base-color : BLACK;
scrollbar-face-color : BLACK;
scrollbar-highlight-color : SILVER;
scrollbar-shadow-color : SILVER;
scrollbar-track-color : BLACK;
}
</STYLE>
<form name=&quot;jump&quot;>
<select name=&quot;menu&quot; onChange=&quot;location=document.jump.menu.options[document.jump.menu.selectedIndex].value;&quot; value=&quot;GO&quot; class=&quot;selectmenu&quot;>
<option value=&quot;<option value=&quot;<option value=&quot;</form>

the links work, but with the addition of:
scrollbar-arrow-color : GREEN;
scrollbar-base-color : BLACK;
scrollbar-face-color : BLACK;
scrollbar-highlight-color : SILVER;
scrollbar-shadow-color : SILVER;
scrollbar-track-color : BLACK;
into the .selectmenu style tag, it make the background color of the drop down black, and the writing black.

Any suggestions on what to add to the .selectmenu style tag you posted above, so as to change the scrollbar color on the drop down menu?

Thanks [deejay]
Nate
&quot;If you're not living on the edge, you're taking up too much space!&quot;
 
Sorry one other thing:

How do I change the color of the scrollbar in the text area too?

Thanks, you've been a great help so far. [deejay]
Nate
&quot;If you're not living on the edge, you're taking up too much space!&quot;
 
Hi,

If I am not mistaken, you can not change the select box scrollbar but you can change the textarea.

I think it works with the body function, so if you change the actual page scrollbars then the textarea changes also..

I don't have the proper syntax just now to test it but if you need the code just ask...

Hope this helps Wullie

 
Too change them all at once I use this:

BODY
{
scrollbar-face-color: #606060;
scrollbar-shadow-color: #000000;
scrollbar-highlight-color: #606060;
scrollbar-3dlight-color: #000000;
scrollbar-darkshadow-color: #000000;
scrollbar-track-color: #000000;
scrollbar-arrow-color: #000000;
}

Dont put a . or a # infront of &quot;BODY&quot; otherwise
it will NOT work.

I hope this helps, [bobafett] BobbaFet [bobafett]

Everyone has a right to my opinion.
E-mail me at caswegkamp@hotmail.com
 
Bobbafet,

I already had that style tag in my source code but the scrollbars are just plain grey still. Except the page scrollbar. That one is the color I want. But the others aren't.

And, I know that this can be done for both, because I've seen it.

[deejay]
Nate
&quot;If you're not living on the edge, you're taking up too much space!&quot;
 
OK, I figured out the textarea scrollbar.

I was using the tag to do it.
I was using <INPUT TYPE=&quot;TEXT&quot;>

when I should have been using:
<TEXTAREA></TEXTAREA>

Still looking for the color change of the drop down.
Thanks. [deejay]
Nate
&quot;If you're not living on the edge, you're taking up too much space!&quot;
 
wullie,

You were right. You can't change the color of the scrollbar for select menus.

Thanks to everyone who helped me figure the other things out. [deejay]
Nate
&quot;If you're not living on the edge, you're taking up too much space!&quot;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top