Possible Duplicate:
Change cursor type on input type=“file”
This is my jsfiddle:
http://jsfiddle.net/3zNMK/
This class already has a cursor but not working:
.file
{
cursor:pointer;
}
I want that even though a hover is made on textbox inside input type file, it should change to hand icon. But it is not working.
Any way to change this behavior?
Try some manipulation like this
HTML
<span class="file-wrapper">
<input type="file" name="photo" id="photo" />
<span class="button">Choose a File</span>
</span>
CSS
.file-wrapper {
cursor: pointer;
display: inline-block;
overflow: hidden;
position: relative;
}
.file-wrapper input {
cursor: pointer;
font-size: 100px;
filter: alpha(opacity=1);
-moz-opacity: 0.01;
opacity: 0.01;
position: absolute;
right: 0;
top: 0;
}
.file-wrapper .button {
background: #333;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
border-radius: 5px;
color: #fff;
cursor: pointer;
display: inline-block;
font-size: 11px;
font-weight: bold;
margin-right: 5px;
padding: 4px 18px;
text-transform: uppercase;
}
DEMO
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With