On Tue, 17 Jul 2007, Emanuele Venezia wrote: > Is there a way to define the style for an input type="file"? I would > like to change the borders and colors of the button associated, leaving > the inputbox like the other ones, but I don't know how to specify it in > the css.
It's tricky. You can assign CSS properties to an input type="file" element as for any element, but 1) browser support to CSS properties as applied to input fields is generally more limited than for normal elements, and what works on one browser may well lack any effect on another; 2) there is no authoritative specification or even a good informal description of what the various CSS properties _mean_ for an input type="file" element; in particular, the typical rendering of such an element consists of two parts, a text input box and a Browse button, but you cannot refer to them separately in CSS. It is not clear at all what happens if you e.g. set a border for the element. Does it affect the border of the text box, or of the button, or maybe both? The _natural_ interpretation, IMHO, is that the border should relate to the element as a whole, drawing an outer border, and leaving the box and button borders untouched, as external to CSS. Yet, e.g. IE 7 seems to apply the border property to the two components. -- Jukka "Yucca" Korpela, http://www.cs.tut.fi/~jkorpela/ ______________________________________________________________________ css-discuss [EMAIL PROTECTED] http://www.css-discuss.org/mailman/listinfo/css-d IE7 information -- http://css-discuss.incutio.com/?page=IE7 List wiki/FAQ -- http://css-discuss.incutio.com/ Supported by evolt.org -- http://www.evolt.org/help_support_evolt/