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(); });
Comments
Post a Comment