I am working on a website where the client does not want any javascript to be used. I have successfully styled the file update button for my website using the following piece of code.
.btn-file {
position: relative;
overflow: hidden;
}
.btn-file input[type=file] {
position: absolute;
top: 0;
right: 0;
min-width: 100%;
min-height: 100%;
font-size: 100px;
text-align: right;
filter: alpha(opacity=0);
opacity: 0;
outline: none;
background: white;
cursor: inherit;
display: block;
}
<label class="btn btn-default btn-file">
Browse
<input type="file" style="display: none;">
</label>
However, once the file is selected, without using javascript I cannot show the file name next to the button like in the example below.
Any suggestions to do this using the browsers conventional upload button?