Reputation: 49817
I was wondering, is there any CSS rule to reset an element style?
It would be great to be able to use just with one class like .reset
.
Any suggestions?
Upvotes: 3
Views: 4358
Reputation: 63580
You can create a single CSS class that will "reset" styles to whatever you want:
.reset{
border:0;
padding:0;
margin:0;
font-weight:normal;
/*etc.*/
}
Then apply to your elements:
<h1 class="reset">...</h1>
Is this what you are after?
Just keep in mind that the first "C" in CSS stands for Cascading and thus you may need to be more specific in the CSS to overcome other styles applied to an element. CSS Precedence reference.
Upvotes: 1