In my project I have file input button, for that i need to remove the file text box and need to set some background for browse button.
Kindly give me idea.
Nicely styled file upload
Programmatically trigger a click
CODE
$('img#mytrigger').on('click', function () {
$('#fileupload-example-1').trigger('click');
});
Provide a label for the input field
CODE
<input type="file" id="fileupload-example-4"/>
<label id="fileupload-example-4-label" for="fileupload-example-4">Click me</label>
CSS
#fileupload-example-4 {
height: 0;
width: 0;
}
#fileupload-example-4-label {
border: 1px solid #cccccc;
padding: 5px;
}
jQuery is required for this method. Include the following line in code too.
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
Ref: link
try this technique..
echo "<div>
";
echo "<div style=\"width:80px;position:absolute;\">Browse</div >
";
echo "<input type=\"file\" style=\"width:80px;position:absolute;opacity:0;\" />
";
echo "</div>
";