c# - styling the asp:fileupload control -


i have file upload control in asp.net so:

<asp:fileupload id="file1" runat="server" font-size="small" width="100%" />   

for reason browse... button not apply standard css have applied input[type="button"] controls.

how can apply same css browse button of control?

try this

<input type="file" class="hidden" id="uploadfile"/> <div class="button" id="uploadtrigger">browse</div> 

some css

.hidden {     display:none; } .button {     border: 1px solid #333;     padding: 10px;     margin: 5px;     background: #777;     color: #fff;     width:75px; } 

js

$("#uploadtrigger").click(function(){    $("#uploadfile").click(); }); 

demo


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -