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!

Changing border style in SELECT boxes 1

Status
Not open for further replies.

rmc

Programmer
Feb 1, 2001
11
0
0
GB
I'm creating a set of forms which i want to have a uniform feel. I've altered all the type=text input tags so that by assigning a class from a style sheet, they have a nice 1px wide black border rather than the usual style.

This was done by using the style info:...

"border-left: 1pt solid #000000"

for each border (right, top, etc.)

HOWEVER this fails to alter the appearance of my SELECT boxes!! Obviously this screws up the uniform feel of the page.

Any solutions or pointers much appreciated!!
 
You cannot do it ( at least in any browser I know of ) as it is a windowed control and rendered directly by the operating system. jaredn@eae.net -
 
It appears that jaredn is correct. I tried assigning various style attributes to a select box and very few of them work (background being one of the few). border-width, border-color and border-style do NOT work. Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard.
 
Thanks for the help! Find it a bit strange that one form element allows a lot of style attributes yet another doesn't...ah well thats HTML i suppose.

The combo box script looks like it'll do the job very well though! :)
 
yes, you can make it work. Actually, it works for both IE and Netscape (my versions are 5.0 and 4.7).

Here is how:

#yourStyle {border-left: border-left: 1pt solid #000000;}

<select name=&quot;whatever&quot; id=&quot;yourStyle&quot;>
<option>Select</option>
</select>

Good Luck!
 
That doesn't do a thing in IE 5.5!
Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard.
 
That didn't work for me either in NN 4.75 or IE 5.5... But it did work in Netscape 6 (after I fixed the typo).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top