A Pen by James Hobson.
@import "compass";
.upload {
position:relative;
width:664px;
}
.realupload {
position:absolute;
top:0;
right:0;
/* start of transparency styles */
opacity:0;
-moz-opacity:0;
filter:alpha(opacity=0);
/* end of transparency styles */
z-index:2; /* bring the real upload interactivity up front */
width:270px;
}
form .fakeupload {
background:url(browse.gif) no-repeat 100% 50%;
}
form .fakeupload input {
width:401px;
border: none;
background: #eee;
padding: 5px;
}
<form>
<div class="upload">
<label for="realupload">Upload Image: </label>
<div class="fakeupload">
<input type="text" name="fakeupload" /> <!-- browse button is here as background -->
</div>
<input type="file" name="upload" id="realupload" class="realupload" onchange="this.form.fakeupload.value = this.value;" />
</div>
</form>