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

CSS and Select boxes?

Status
Not open for further replies.

CFHub

Technical User
Apr 6, 2001
171
CA
Am I missing something with the CSS style properties associated with SELECT boxes?

I have code like this in my header:

<style type=&quot;text/css&quot;>
<!--

.TEXTBOX {background-color: transparent; color: #000000; border-color:#3399cc; border-style: solid}
.SUBMIT {font-family: Verdana; font-size: 8pt; font-weight: bold; border-color:#3399cc; background-color: transparent; color: #122326; border-style: solid; cursor:hand}
.TEXTAREA {background-color: transparent; color: #000000; border-color:#3399cc; border-style: solid; font-family:arial}
.SELECT {background-color: transparent; color: #000000; border-color:#3399cc; border-style: solid; font-family:arial}

-->
</style>

And a simple (nice looking) form like this:

<form action=&quot;index.cfm&quot; method=&quot;post&quot;>
<input type=&quot;text&quot; name=&quot;test1&quot; class=&quot;textbox&quot;><br><br>
<textarea name=&quot;test2&quot; class=&quot;textarea&quot;>Default..</textarea><br><br>
<select name=&quot;test3&quot;>
<option class=&quot;select&quot;>Test1
<option class=&quot;select&quot;>Test2
</select>
<br><br>
<input type=&quot;submit&quot; name=&quot;submit&quot; class=&quot;submit&quot; value=&quot;SEARCH&quot;>
</form>

All the elements look very nice and are using the CSS styles EXCEPT the Select box??

Is there some subtle trick to this?

Thanks for any pointers :)
 
I guess IE doesn't like having borders on select boxes. It'll work fine in Netscape 6 if you change the names of the classes to lowercase...
 
IE seems to have a real problem with most style attributes when applied to a select box. I think I read someone say that it has something to do with it being a windows widget.
Tracy Dryden
tracy@bydisn.com

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard.
 
Thanks for the quick replies :)

I will accept as fact that it just won't work. I guess I can live with just making the background &quot;transparent&quot; (which does work) and just forget that the select boxes border is doomed to black.

Best of luck. -Joseph Thompson -->prefers ketchup TY:)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top