Can we change <input type="file"> style?
Posted
by learner.php
on Stack Overflow
See other posts from Stack Overflow
or by learner.php
Published on 2010-05-13T09:05:33Z
Indexed on
2010/05/13
9:14 UTC
Read the original article
Hit count: 170
I tried to change the HTML form, input type file. Here is my code:
HTML, form id = form
<input class="upload_file" type="file" id="file" name="file" />
.CSS
I tried both:
.upload_button{
background: url('../images/upload_btn_bg.png') no-repeat;
width: 200px;
height: 40px;
}
#form input[type=file]{
background: url('../images/upload_btn_bg.png') no-repeat;
width: 200px;
height: 40px;
}
None of both of those methods works. I did see from some website, like facebook, youtube, google or twitter, they have different style. Wonder how they do it.
© Stack Overflow or respective owner