0

I would like to apply this css on my .FileUpload button , but It only works on IE and not on Chrome and I still don't know what is wrong with it. Someone as got an idea ?

Thanks for helping

.FileUpload
{
 width: 90px;
float: left;
color: black;
font-family: Segoe UI,Arial, Sans-Serif;
border: 1px solid #C7D2D8;
height: 30px;
text-decoration: none;
display: inline;
background: white;
margin: 10px 10px 10px 540px;
text-align: center;
padding: 4px 0;
letter-spacing: -1;
border: none;
cursor: pointer;
}
2
  • How does it fail for Chrome? What is it? (I'd assume it's an <input type="file"> but you never know.) Commented Jan 16, 2012 at 15:14
  • Actually it's a <asp:FileUpload ID="FileUpload1" runat="server" /> Commented Jan 16, 2012 at 15:16

2 Answers 2

1

AFAIK it is not possible to style an <input type="file">, for all browsers. But you could replace the upload-field with javascript and the replacement can by styled as much as you want.

You'll get an example of such a replacement script in this blog entry.

Sign up to request clarification or add additional context in comments.

6 Comments

The thing is that it's working on IE , and not on Chrome , isn'it weird ?
Not really. That different browsers interpret the same style definition differently is not weird! ;-)
But I cant use this Input Type File , because I am using method and properties from the FileUpload component .=(
The output is normal HTML, isn't it? There doesn't exists any other html tags to upload files, except <input type="file" />.
Yes, this is the server side programming language, and what is the output? XML/XSLT? I guess it is HTML!
|
1

You can try using jquery instead, this would be cross browser compatable then, more info here > http://jqueryui.com/demos/button/#default either that or there are several examples here on different methods of achieving what you want http://speckyboy.com/2010/05/26/20-awesome-jquery-enhanced-css-button-techniques/

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.