Previous Message
Next Message

style attributes for select element

Sent by Chris Heilmann on 21 June 2004 00:12


Marcelo Wolfgang wrote:

>First Hi list, 
>
>I'm just joining here and hope someone can help me out
>
>I'm having trouble find this information on the web about what styles
>attributes does the select element accept cross browser.
>
>Through test I've notice that are not many accepted attributes for
>this control, I couldn't even make the border work on IE ( it works on
>firefox though ).
>
>So, if there is somewhere I can read more about it, or if someone does
>have a list, please share.
>  
>
Depends how you define cross-browser. The select element is part of the 
operating system, not the browser chrome. Therefore it is very 
unreliable to style, and does not  necessarily make sense to try 
anyways.  A form element is easily recognisable when you keep it as it 
is, as the user knows it.

If you need to style a dropdown, you might as well use a DHTML one, 
which can be completely styled and can send the data to a URL or change  
a hidden form field value via Javascript.

I am working on a script & article about that right now, but got some 
bugs on Macs to fix:
http://www.onlinetools.org/tests/workingnavdropdown.html  and 
http://www.onlinetools.org/tests/enhancedropdown.html 
The script turns all selects with a certain class into DHTML dropdowns 
with hidden elements. You can style them via the classes discribed in 
the source.

If you are just trying to style selects, though, make sure you test, 
test and test a bit more. One of the biggest problems I found so far is 
that IE cuts off the conttent of options when you  set a fixed width to 
a select.


______________________________________________________________________
css-discuss [EMAIL-REMOVED]]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
Previous Message
Next Message

Message thread: