form element borders

windows

Guest
I can modify the inner borders of a text box or text area by setting a border property in CSS but, for some reason, the border property does not work for a drop-down select box. Anyone know how to do this?What are you trying to style? It probably will never work on IE but FF usually handles it.I've tried on select boxes also, and couldn't figure out a way. It probably has to do with the fact that all browsers render select boxes as a windowed object, meaning they technically don't exist in the same layer as the rest of your Web page. Think "direct part of the operating system."Originally posted by toicontien
I've tried on select boxes also, and couldn't figure out a way. It probably has to do with the fact that all browsers render select boxes as a windowed object, meaning they technically don't exist in the same layer as the rest of your Web page. Think "direct part of the operating system." You'll find that it's actually only IE5+ on Windows that do this. Mozilla and Opera will let you place other elements on top of select drop-downs, since they render their own controls. Regardless of this fact though (in any browser), such elements are rather picky when it comes to what properties work and what ones simply don't.

Not exactly what you asked for, but the closest you're going to get is something like:.sel { border: solid #000 1px; padding: 0.2em }<span class="sel">
<select>
<option>foo</option>
</select>
</span>Thanks, I was actually tyring it in Netscape.
If I can't get all of the form elements to have the same look then I might as well not alter the text boxes either.
 
Back
Top