rsd
11-18-2004, 07:12 PM
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?
|
Click to See Complete Forum and Search --> : form element borders rsd 11-18-2004, 07:12 PM 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? ray326 11-18-2004, 07:20 PM What are you trying to style? It probably will never work on IE but FF usually handles it. toicontien 11-19-2004, 10:24 AM 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." ray326 11-20-2004, 12:25 AM fredmv 11-20-2004, 08:45 AM 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> rsd 11-20-2004, 09:39 AM 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. webdeveloper.com
Copyright Internet.com Inc., All Rights Reserved. |