[an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive]
   wise-women



[an error occurred while processing this directive]homeback about/faq features tutorials resources members search
resources
 

Wise Women List Archive File

CSS and Form Buttons

Question:

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


 

resources

Books

Recommendations and Reviews for web professionals.

List Archives

Project WW Archive: how you can help us to build up a treasure trove of useful information.

List of available archives

Alphabet Soup

Essential terminology for the serious web professional.

 

Printable version of this page

Link to us


Join the discussion lists

 
 
passionate about the web