html5 - Hide default css button -


this question has answer here:

i using:

<div class="upload-area">     <input type="file" name="attachemnt" class="buttonclass" />  </div>  

i trying hide default css button, , make nice one, cannot figure out how.

can help?

there no standard way this. can hacks. method you

.fileinput {     cursor: pointer;     height: 25px;     overflow: hidden;     position: relative;     width: 100px; }  .fileinput em {     background: linear-gradient(to bottom, #d65a75 0%, #cd4874 100%) repeat scroll 0 0 transparent;     color: #ffffff;     cursor: pointer;     display: inline-block;     font-family: 'arial';     font-size: 15px;     font-style: normal;     margin-top: 5px;     padding: 4px 7px;     text-decoration: none;     text-shadow: 1px 1px 0 #b8283d; }  .fileinput input {     bottom: 0;     cursor: pointer;     left: 0;     opacity: 0;     position: absolute;     right: 0;     top: 0; } 

the html markup:

<span class="fileinput">     <input id="file" type="file" name="file">     <em>browse computer</em> </span> 

working demo @ http://jsfiddle.net/ghbna/


Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -