1

I want to replace input="file" button to only text like that http://valums.com/wp-content/uploads/ajax-upload/demo-jquery.htm but i don't want to use whole library. How can i do this ?

1 Answer 1

7

It is actually input type="file" control. They have used a wrapper div to show it. You can style a div as the Upload button text using an image. Then place an input type="file" control on top of it and make its opacity to 0. Thats all

Eg:

<style>
.invis
{
 margin: -5px 0pt 0pt -175px; padding: 0pt; position: absolute; width: 30px; height: 30px; font-size: 14px; cursor: 

pointer;opacity: 0; display: block; z-index: 2147483583; top: 2px; left: 180px;filter:alpha(opacity=0);
}
</style>
<div>test</div>
<input type="file" name="myfile" class="invis" />

I haven't used any image. You can use an image to style the wrapper div.

Sign up to request clarification or add additional context in comments.

1 Comment

This is actually the solution I've been searching on the net but couldn't find it. I new it has something to do with overlaying DIVs, but couldn't remember. +1 from me.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.