I’m hoping someone can help me with this.
When I’m styling html components say all divs on the page I would add a CSS like:
div
{
background-color:Red;
}
which works fine. However when it come to styling an asp.net control say a button I try:
button
{
background-color:Red;
}
but this doesn’t work. Could someone please tell me how you style these creatures?
An asp.net button is actually an
inputelement. So to style it you would use:But that would style all input elements (text boxes, button, radio buttons, check boxes). To target just buttons you can use some CSS3:
Or, you can just give all the buttons you want to style a class and do it that way: