File tree Expand file tree Collapse file tree 2 files changed +66
-16
lines changed
myWork/03-CSS-Fundamentals Expand file tree Collapse file tree 2 files changed +66
-16
lines changed Original file line number Diff line number Diff line change 8
8
9
9
< body >
10
10
< header class ="main-header ">
11
- < h1 > 📘 The Code Magazine</ h1 >
11
+ < h1 class =" title-text " > 📘 The Code Magazine</ h1 >
12
12
13
13
< nav >
14
14
< a href ="blog.html " target ="_blank "> Blog</ a >
@@ -18,11 +18,12 @@ <h1>📘 The Code Magazine</h1>
18
18
</ nav >
19
19
</ header >
20
20
21
- < article >
21
+ < article class =" product-article " >
22
22
< header >
23
- < h2 > The Basic Language of the Web: HTML</ h2 >
23
+ < h2 class =" article-header " > The Basic Language of the Web: HTML</ h2 >
24
24
25
25
< img
26
+ class ="author-image "
26
27
src ="images/laura-jones.jpg "
27
28
alt ="Photo of Laura Jones "
28
29
width ="50 "
@@ -33,6 +34,7 @@ <h2>The Basic Language of the Web: HTML</h2>
33
34
</ p >
34
35
35
36
< img
37
+ class ="article-image "
36
38
src ="images/post-img.jpg "
37
39
alt ="HTML code on a screen "
38
40
width ="500 "
@@ -68,7 +70,7 @@ <h3>What is HTML?</h3>
68
70
69
71
< p > In HTML, each element is made up of 3 parts:</ p >
70
72
71
- < ol >
73
+ < ol class =" article-list " >
72
74
< li > The opening tag</ li >
73
75
< li > The closing tag</ li >
74
76
< li > The actual element</ li >
@@ -90,7 +92,7 @@ <h3>Why should you learn HTML?</h3>
90
92
web. Here are 5 of them:
91
93
</ p >
92
94
93
- < ul >
95
+ < ul class =" article-list " >
94
96
< li > To be able to use the fundamental web dev language</ li >
95
97
< li >
96
98
To hand-craft beautiful websites instead of relying on tools like
Original file line number Diff line number Diff line change
1
+ * {
2
+ margin : 0 ;
3
+ padding : 0 3px ;
4
+ }
5
+
1
6
body {
2
7
color : # 444444 ;
3
8
font-family : sans-serif;
4
9
}
5
10
11
+ .main-header {
12
+ background-color : # f7f7f7 ;
13
+ border-top : 5px solid # 1098ad ;
14
+ padding : 10px 20px ;
15
+ margin-bottom : 15px ;
16
+ }
17
+
18
+ .related-aside {
19
+ background-color : # f7f7f7 ;
20
+ border-top : 5px solid # 1098ad ;
21
+ border-bottom : 5px solid # 1098ad ;
22
+ padding : 10px 0 ;
23
+ }
24
+
6
25
h1 ,
7
26
h2 ,
8
27
h3 {
9
28
color : # 1098ad ;
29
+ margin-bottom : 10px ;
10
30
}
11
31
12
32
h1 {
17
37
18
38
h2 {
19
39
font-size : 40px ;
40
+ margin-bottom : 8px ;
20
41
}
21
42
22
43
h3 {
23
- font-size : 25px ;
44
+ font-size : 22px ;
45
+ margin-top : 30px ;
24
46
}
25
47
26
48
h4 {
32
54
p {
33
55
font-size : 16px ;
34
56
line-height : 1.5 ;
57
+ margin-bottom : 10px ;
58
+ }
59
+
60
+ .article-list {
61
+ margin : 0 25px 5px 25px ;
35
62
}
36
63
37
64
li {
38
65
font-size : 15px ;
66
+ margin-bottom : 10px ;
67
+ }
68
+
69
+ li : last-child {
70
+ margin-bottom : 0 ;
39
71
}
40
72
41
73
.author {
42
74
font-style : italic;
43
75
font-size : 14px ;
76
+ margin-bottom : 3px ;
44
77
}
45
78
46
79
.copyright {
56
89
list-style : none;
57
90
}
58
91
59
- .main-header {
60
- background-color : # f7f7f7 ;
61
- }
62
-
63
- .related-aside {
64
- background-color : # f7f7f7 ;
65
- border-top : 5px solid # 1098ad ;
66
- border-bottom : 5px solid # 1098ad ;
67
- }
68
-
69
92
a : link {
70
93
color : # 1098ad ;
71
94
text-decoration : none;
@@ -85,3 +108,28 @@ a:active {
85
108
background-color : black;
86
109
font-style : italic;
87
110
}
111
+
112
+ .title-text {
113
+ margin-top : 5px ;
114
+ margin-bottom : 5px ;
115
+ }
116
+
117
+ .author-image {
118
+ margin-bottom : 3px ;
119
+ }
120
+
121
+ .article-image {
122
+ margin-bottom : 5px ;
123
+ }
124
+
125
+ strong {
126
+ padding : 0 ;
127
+ }
128
+
129
+ .article-header {
130
+ font-size : 40px ;
131
+ }
132
+
133
+ .product-article {
134
+ margin-bottom : 20px ;
135
+ }
You can’t perform that action at this time.
0 commit comments