HTML and CSS Reference
In-Depth Information
In styles.css, do the following:
1.
Add a new rule set for
#header
with the declaration
margin: 0 0 2em 0;
.
2.
Add a new rule set for
#header .logo
with the declaration
margin: 2.4em 0;
.
3.
Add a new rule set for
#header nav
with the declaration
margin-top: 2em;
.
4.
Add the declaration
margin: 0 auto;
to the
#content
rule set.
5.
Add a new rule set for
.container
with the declarations
max-width: 920px;
and
margin: 0
auto;
.
6.
Add the declaration
margin: 2em auto 1em;
to the
in-
put[type=”submit”][class=”button”]
rule set.
7.
Add a new rule set for
aside
with the declaration
margin: 0 0 2em 0;
.
8.
Add the declaration
margin: 0 0 1.6em 0;
to the rule set
aside > h3
.
9.
Add a new rule set for
#content h1, #content h2, #content h3, #content h4
with the
declaration
margin: 0 0 1.6em 0;
.
10.
Add a new rule set for
#content p, #content ul
with the declaration
margin: 0 0 1.25em
0;
.
11.
Add a new rule set for
blockquote cite
with the declaration
margin: 0.625em 0 0 0;
.
12.
Add a new rule set for
#newsletter h3
with the declaration
margin: 0 0 1em 0;
.
13.
Add a new rule set for
#newsletter label
with the declaration
margin: 1.5em 0 0 0;
.
14.
Add a new rule set for
.aside
with the declaration
margin: 0 0 2em 0;
.
15.
Add a new rule set for
.post h3
with the declaration
margin: 0 0 1em 0;
.
16.
Add a new rule set for
.post img
with the declaration
margin: 0 .5em 0 0;
.
Project files update (ch07-01): If you haven't followed the previous instructions and are comfortable working from
here onward or would like to reference the project files up to this point, you can download them from
padding
Initial value:
0
| Inherited: No | Applies to: All except table-row-group, table-header-group, table-footer-group, table-
row, table-column-group and table-column | CSS2.1
Browser Support: IE 4+, Firefox 1+, Chrome 1+, Opera 3.5+, Safari 1+
padding
works in a similar way to
margin
but instead applies to the inside of an element prior to the border,
rather than the outside of the element after the border.