Skip to content

Commit 49f55e0

Browse files
committed
margin padding box sizing
1 parent 4b02470 commit 49f55e0

File tree

2 files changed

+43
-22
lines changed

2 files changed

+43
-22
lines changed

starter/03-CSS-Fundamentals/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ <h1>📘 The Code Magazine</h1>
2929
</header>
3030

3131
<article>
32-
<header>
32+
<header class="post-header">
3333
<h2>The Basic Language of the Web: HTML</h2>
3434

3535
<img

starter/03-CSS-Fundamentals/style.css

Lines changed: 42 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,39 @@
11
* {
2-
/* border-top: 10px solid #1098ad; */
2+
padding: 0;
3+
margin: 0;
34
}
45

56
body {
67
color: #444;
78
font-family: sans-serif;
9+
border-top: 10px solid #1098ad;
10+
}
11+
12+
nav {
13+
font-size: 18px;
14+
}
15+
16+
article {
17+
margin-bottom: 60px;
18+
}
19+
.main-header {
20+
background-color: #f7f7f7;
21+
/* padding: 20px;
22+
padding-left: 40px;
23+
padding-right: 40px; */
24+
padding: 20px 40px;
25+
margin-bottom: 60px;
26+
}
27+
.post-header {
28+
margin-bottom: 40px;
29+
}
30+
aside {
31+
background-color: #f7f7f7;
32+
border-top: 5px solid #1098ad;
33+
border-bottom: 5px solid #1098ad;
34+
padding: 50px 0;
835
}
936

10-
h1,
11-
h2,
12-
h3,
13-
h4,
14-
p,
15-
/* li { */
16-
/* font-family: sans-serif; */
17-
/* color: #444; */
18-
/* } */
1937
h1,
2038
h2,
2139
h3 {
@@ -28,9 +46,12 @@ h1 {
2846
}
2947
h2 {
3048
font-size: 40px;
49+
margin-bottom: 30px;
3150
}
3251
h3 {
3352
font-size: 30px;
53+
margin-bottom: 20px;
54+
margin-top: 40px;
3455
}
3556
h4 {
3657
font-size: 20px;
@@ -40,9 +61,19 @@ h4 {
4061
p {
4162
font-size: 22px;
4263
line-height: 1.5;
64+
margin-bottom: 15px;
65+
}
66+
ol,
67+
ul {
68+
margin-left: 50px;
69+
margin-bottom: 20px;
4370
}
4471
li {
4572
font-size: 20px;
73+
margin-bottom: 10px;
74+
}
75+
li:last-child {
76+
margin-bottom: 0;
4677
}
4778

4879
/* footer p {
@@ -65,14 +96,7 @@ li {
6596
.related {
6697
list-style: none;
6798
}
68-
.main-header {
69-
background-color: #f7f7f7;
70-
}
71-
aside {
72-
background-color: #f7f7f7;
73-
border-top: 5px solid #1098ad;
74-
border-bottom: 5px solid #1098ad;
75-
}
99+
76100
/* body {
77101
background-color: orchid;
78102
} */
@@ -125,6 +149,3 @@ a:active {
125149
footer p {
126150
color: orange;
127151
}
128-
nav {
129-
font-size: 18px;
130-
}

0 commit comments

Comments
 (0)