You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Van Nguyen <vn...@ur.com> on 2006/11/07 22:45:14 UTC

HTML:FILE

I'm trying to create a jsp page that can upload a file.  Everything
works, but I cannot apply my style to the "Browse" button:

 

<html:file property="theFile" size="40" styleClass="browse_button" />

 

That displays the regular button... I apply the same styleClass to the
submit button and that works out fine:

 

<html:submit styleClass="submit_button" />

 

Any ideas on why it my style won't apply to the "Browse" button??


Re: HTML:FILE

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Van,

> I’m trying to create a jsp page that can upload a file.  Everything
> works, but I cannot apply my style to the “Browse” button:

Most browsers don't let you style the browse button for file input types
specifically.

> That displays the regular button… I apply the same styleClass to the
> submit button and that works out fine:

Yup: that's because it's a "button" instead of a "file" input type. I
think you might just be out of luck.

Also remember that Safari won't let you style buttons at all.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFURSP9CaO5/Lv0PARAq86AKCbxpnO0NWrpJiufghYc1DgaurMRwCfVuWd
Xdh0v8SjllxjHA4VgaZKOzM=
=bXWD
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org