Wise Women List Archive File

CSS and Form Buttons


How do I apply CSS to the "Browse" form button? (The "Browse" button displays when an input field is used on a form. The input field allows a visitor to upload a file; the browse button allows them to browse their own harddrive to locate the file they plan to upload.) I can apply CSS properly to the "Submit" button and it looks great. However, when I try to apply it to the "Browse" button, it turns the entire text box area the same color as the button ... it seems to be applying the CSS to the button and the text box together. I want only the button to pick up the CSS style.

You cannot apply CSS to the browse button of the input field of the file type - just to the text field. This special browse button is called up from the underlying operating system. If you call up the page in a German browser it will show "Durchsuchen" in a matching width - you can't change the text either. In your case it looks as if the css border declaration is applied to the browse button because it seems to sit "inside" the text field. Some information concerning this can be found at http://www.cs.tut.fi/~jkorpela/forms/file.html#present