Jorge
Jorge

Reputation: 5676

CSS HTML form "file" customize

Can someone teach me or give me a link for my problem?

I wanted to customize my form "file" --> for uploading.
How can I customize it?

.classfile {
css codes....
}

<input type="file" name="name" class="classfile" />

If I do that way the text box and button of form will be affected. What is the other way to customize that?

Upvotes: 1

Views: 2420

Answers (2)

RoToRa
RoToRa

Reputation: 38441

The short answer: You can't and you shouldn't. This is done purposely, to stop tricking people with this security/privacy critical element.

Upvotes: 0

Boris Delormas
Boris Delormas

Reputation: 2549

You can't style a

<input type="file">

Just with CSS. Take a look here for a great trick : http://www.quirksmode.org/dom/inputfile.html

Upvotes: 2

Related Questions