Is this valid CSS to center the div and also apply a top margin?
div {
margin: 0 auto;
margin-top: 30px;
}
Use the following to specify margins:
div { margin : 30px auto 0 auto; } /* margin: [top] [right] [bottom] [left] */
Or, it's shorthand:
div { margin: 30px auto; } /* expands to margin:30px auto 30px auto; */
Or, list them out explicitly:
div { margin-left: 30px margin-right: 30px; margin-top: auto; margin-bottom: auto; }
The choice is yours.