Remove the "No file chosen" tooltip from a file input - HTML CSS CSS Form

HTML CSS examples for CSS Form:input

Description

Remove the "No file chosen" tooltip from a file input

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
  <style id="compiled-css" type="text/css">
input[type="file"] {
   border:2px solid Chartreuse;
   box-sizing:border-box;
   display:inline-block;
   font-size:15px;
   margin:0;
   padding:9px;
   position:relative;
   background-color:yellow;
   overflow:hidden;
   width:100%;
   -webkit-appearance:none;<!--from   ww w  .  j a  v a  2 s.c  o  m-->
   -webkit-box-sizing:border-box;
   z-index:2;
}

input[type="file"]:after {
   background-color:blue;
   content:'';
   display:block;
   height:100%;
   position:absolute;
   top:0;
   left:0;
   width:100%;
   z-index:11;
}

input[type="file"]::-webkit-file-upload-button {
   background:pink;
   color:OrangeRed;
   font:inherit;
   padding:0;
   position:relative;
   border:none;
   text-align:left;
   position:relative;
   z-index:100;
   -webkit-appearance:none;
}
</style> 
 </head> 
 <body> 
  <input type="file">  
 </body>
</html>

Related Tutorials