I have written following code which generates a browse and upload button.i want to change the default style of browse b开发者_开发问答utton.explain me how to do that.
<input id="formButton" type="file" name="csv" size="40" value="" />
<input type="submit" name="upload_bulk_trainees" value="Upload" />
Styling of type="file"
fields is extremely limited. Some browsers allow more customization than others - but the general rule is that you better don't expect any styling to apply for those fields.
I don't believe this is possible. As a security measure, these input controls are kept with a standard look so that users always know what they're interacting with.
either use the style tag
<input type="submit" name="upload_bulk_trainees" style="background-color: blue" value="Upload" />
or a css class
<style type="text/css">
.button {
background-color: red;
}
</style>
<input type="submit" name="upload_bulk_trainees" class="button" value="Upload" />
精彩评论