How to theme Browse button of a FileUpload control?

Y

yeltsin27

Theming seems only to affect the text box of a FileUpload control, not
the Browse button. Is there any way to theme the button as well?

Thanks,

ChrisN
 
C

Chris Lincoln

I managed to accomplish this using FrontPage while working on a
Sharepoint site a while ago. You can use the style attribute and then
set border-color, border-width, etc. I would imagine a css class would
be effective too, although I have not tried that with a FileUpload
control.

e.g.
<asp:FileUpload ID="FileUpload1" runat="server"
style="border-color:#b8b8b8;"/>

Hope this helps.

-Chris Lincoln
 
Joined
Jan 28, 2012
Messages
1
Reaction score
0
Straight forward styling of FileUpload without CSS hacks

I found an excellent post about styling this without using any CSS hacks :) Mathias Kunto has a few lines of jQuery and some codebehind: http://blog.mathiaskunto.com/2012/0...aspfileupload-control-using-control-adapters/

It is not possible to style the actual button on an file upload. I have
seen a hack that uses CSS to place a "fake" style over the top of the
button.. here is a link that explains it better.

http://www.quirksmode.org/dom/inputfile.html
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,185
Members
46,738
Latest member
JinaMacvit

Latest Threads

Top