Thursday, July 23, 2009

How to hide File Browse button in HTML?

Hide the file browse button



download image below:


Now use following HTML code:


User following Stylesheet:
input.hidden {
opacity:0;
position:relative;
text-align:left;
filter:alpha(opacity=0);
}

<div
style=" overflow: hidden; width: 70px; height: 28px; position: absolute; direction: rtl; ">
<img src="btn_add.gif" style="z-index: 2;"/>
<input type="file" style="cursor: pointer; z-index: 3; position: absolute; top: 0px; left:0px;"
class="hidden" value="" name="file1" id="file1"/>
</div>

and now u can see than on clicking on add button image it will open File Upload Dialog box.

It's due to we jst put Browse button on top of Add Image button as transparent image.

Try this code......

good luck...

3 comments:

Unknown said...

Pretty good post. I just stumbled upon your blog and wanted to say that I have really enjoyed reading your blog posts. Any way I’ll be subscribing to your feed and I hope you post again soon. yarns international

Unknown said...

The good service means they need to give unique and good content within a balanced price. top essay writing service always notices these three things. And the expert writer will take care of the customer need.

Anonymous said...


Great Post,really it was very helpful for us.
Thanks a lot for sharing!
I found this blog to be very useful!!
JAVA training in Bangalore

Contributors