can anyone help me to change the style of input type 'file' in html. i referred the below links but my problem is not resolved.i need to give color to the browse-button, when i try to apply style to browse-button, the text-box disappears i cant see what file i have selected in the text-box. here is my code:
<div id="fileimport">
<div class="fileupload">
<input type="file" name="Upload" style="position: relative" />
</div>
</div>
input.file {
position: relative;
text-align: right;
-moz-opacity: 0;
filter: alpha(opacity: 0);
opacity: 0;
z-index: 2;
}
div.fileupload {
position: relative;
}
$('input[type=file]').on('change', prepareUpload);
function prepareUpload(event) {
files = event.target.value;
if (files != null) {
$("#ShiftValidate").prop('disabled', false);
}
}