Hello Experts,
I have the following CSS code, which styles my input file element:
input[type="file"] {
display: none;
}
.custom-file-upload {
background: #5ad200; /* For browsers that do not support gradients */
background: linear-gradient(#5ad200, #337200); /* Standard syntax */
background: -webkit-linear-gradient(#5ad200, #337200); /* For Safari 5.1 to 6.0 */
background: -o-linear-gradient(#5ad200, #337200); /* For Opera 11.1 to 12.0 */
background: -moz-linear-gradient(#5ad200, #337200); /* For Firefox 3.6 to 15 */
border-radius: 3px;
border-style:none;
width:200px;
height:30px;
color:#FFF;
font-size:12PX;
text-align:center;
clear:both;
margin-bottom: 2px;
padding: 10px;
}
Select all Open in new window
Below is my HTML input element:
<td><label for="file" class="custom-file-upload">Upload Picture</label><input type="file" id="file" name="file"/></td>
Select all Open in new window
Upon styling my element, the file name is no longer visible.
I've found this example online, but I am not familiar with javascript or jQuery, so I really do not know where to begin as to how to modify the code and where it needs to be placed within my php file to work correctly. Click the link below.
Display File Name Please help