Working with Resets

I usually put this reset in my css sheets:

h1, h2, p, ul, ol {
list-style: none outside none;
margin: 0;
padding: 0;

}

However I thought if I were to add:

h1{ margin 0 20px;}

I thought would work, I didn’t know the reset took precedence?

So what if I want my h1 to have 0 margin but on a particular page I want my h1 to have margins?

resets go FIRST THING on the first linked style sheets, other wise you are asking for trouble.
in your rule, you forgot the colon “:”… so if that i exactly what you typed then that’s probably why it seemed not to have overridden the reset.
h1{ margin: 0 20px;}

So what if I want my h1 to have 0 margin but on a particular page I want my h1 to have margins?

two ways to go about this:
#1) add a class to the specific h1

.wmarg{ margin:20px 0;}
<h1 class=“wmarg”>somehead</h1>

#2) add a class to the page container or body, then define the rule around that. this is hand if there are OTHER elements you also want to act different on this page.

<body class=“thispage”>
<h1>something</h1>
</body>
h1{ margin: 0;}
.thispage h1{ margin: 0 20px;}

hopethat helps

Big honking self-promotion:

The History of CSS Resets

(1st of a 3-part series) I don’t take a stand on resets as much as I do examine the thinking behind them, and the 51 flavors of resets submitted by various folks (including SP warriors like Andrew Krespanis, Russ Weakley, and the late Dan Schulz). Not trying to steer you in any direction, just providing info.