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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CSS - Border Color of Select Control

Status
Not open for further replies.

Serban

Programmer
Sep 25, 2001
36
0
0
RO
How can I change the look of Select Control?
I've used this cod:


SELECT NAME="Adresant" STYLE="font-size:19pt;background-color: rgb(245, 229,176);font-weight:bold;color:rgb(0,0,176);border: 1px solid rgb(0,0,176) ">
<OPTION SELECTED>Opt1
<OPTION>Opt2
<OPTION>Opt3
<OPTION>Opt4
</SELECT>

but this change only the background and the font style not the border size and color.
Can I change the color of the gray button of Select control?

Thanks
Mircea Serban
 
i'm fairly confident you can use the input element in a style sheet to control it globally. &quot;It's easier to ask forgiveness than it is to get permission.&quot; - Rear Admiral Dr. Grace Hopper
 
As far as I know you can't fiddle with the border of a select.
 
Magnificat has the answer. The scroll and border cannot be modified. However, I have not played with IE 6.0 yet. DeZiner
Never be afraid to try something new.
Remember that amateurs built the Ark.
Professionals built the Titanic
 
&quot;It's easier to ask forgiveness than it is to get permission.&quot; - Rear Admiral Dr. Grace Hopper

Hey, bra1niac... Are you sure that wasn't Thomas Jefferson, or maybe Rear Admiral Dr. Grace Hopper quoting Jefferson? I really thought I'd heard that quote attributed to Jefferson. Maybe I'm just crazy - everybody tells me I am...
 
I can almost garentee you that you can with Netscape 6.1....

If you can't then its a bug -- the CSS spec does not specifically state you can't just for selects, so it should work. ===
Supports Mozilla and Web Standards
Knows HTML/XHTML, CSS1, JavaScript, PHP, C++, DOM1
===
 
There are a lot of things you can't do with selects. You can't set an image background to them either...
 
Trevman is right. You can set a border for a select in Netscape 6.1...

You can also set a background image for the <option>s...
 
Here's the code I used to test this:
Code:
<html>
<head>
<style type=&quot;text/css&quot;>
select,option {
background-image: url(&quot;image.gif&quot;);
border: 4px solid blue;
}
</style>
</head>
<body>
<select>
<option>First</option>
<option>Second</option>
<option>Third</option>
</select>
</body>
</html>

Remember, it won't work in IE and I only tested it in Netscape 6.1-- I'm not sure if it will work in Netscape 6 or 6.01.
 
Nice. I know I had seen it somewhere.

I just d/l'd IE 6 and will be beating on it in the coming weeks to see how many different ways i can and can't get something formatted correctly (xml) using CSS against it.

I'll let you know if I find out anything worthwhile. I'm tired of using NS 6.1..

Magnificat: I had read the quote by Rear Admiral Dr. Grace Hopper. Whether or not it was stolen from Jefferson is another matter altogether. ;) &quot;It's easier to ask forgiveness than it is to get permission.&quot; - Rear Admiral Dr. Grace Hopper
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top