File tree Expand file tree Collapse file tree 13 files changed +427
-54
lines changed Expand file tree Collapse file tree 13 files changed +427
-54
lines changed Original file line number Diff line number Diff line change
1
+ {
2
+ "editor.formatOnSave" : true
3
+ }
Original file line number Diff line number Diff line change 11
11
}
12
12
.el--2 {
13
13
background-color : orangered;
14
+ /* grid-column: 1 / span 4; */
15
+ /* grid-column: 1 / -1; */
16
+ grid-row : 2 ;
14
17
}
15
18
.el--3 {
16
19
background-color : green;
30
33
}
31
34
.el--8 {
32
35
background-color : crimson;
36
+ grid-column : 2 / 3 ;
37
+ grid-row : 1 / 3 ;
33
38
}
34
39
35
40
.container--1 {
40
45
margin : 40px ;
41
46
42
47
/* CSS GRID */
48
+ display : grid;
49
+ /* grid-template-columns: 3fr 1fr 1fr 1fr; */
50
+ /* grid-template-rows: 1fr 1fr; */
51
+ grid-template-columns : repeat (4 , 1fr );
52
+ grid-template-rows : 1fr 1fr ;
53
+ /* height: 500px; */
54
+
55
+ column-gap : 10px ;
56
+ row-gap : 40px ;
57
+
58
+ /* TEMP */
59
+ display : none;
43
60
}
44
61
45
62
.container--2 {
46
63
/* STARTER */
47
64
font-family : sans-serif;
48
65
background-color : black;
49
66
font-size : 40px ;
50
- margin : 100 px ;
67
+ margin : 40 px ;
51
68
52
- width : 1000 px ;
69
+ width : 700 px ;
53
70
height : 600px ;
54
71
55
72
/* CSS GRID */
73
+ display : grid;
74
+ grid-template-columns : 125px 200px 125px ;
75
+ grid-template-rows : 250px 100px ;
76
+ gap : 20px ;
77
+
78
+ /* Aligning tracks inside container: distribute empty space*/
79
+ justify-content : center;
80
+ align-content : center;
81
+
82
+ /* Aligning items inside cells: move items around inside cells */
83
+ align-items : center;
84
+ justify-items : center;
85
+ }
86
+
87
+ .el--3 {
88
+ align-self : end;
89
+ justify-self : end;
56
90
}
57
91
</ style >
58
92
</ head >
64
98
< div class ="el el--4 "> (4) are</ div >
65
99
< div class ="el el--5 "> (5) amazing</ div >
66
100
< div class ="el el--6 "> (6) languages</ div >
67
- < div class ="el el--7 "> (7) to</ div >
101
+ <!-- < div class="el el--7">(7) to</div> -- >
68
102
< div class ="el el--8 "> (8) learn</ div >
69
103
</ div >
70
104
Original file line number Diff line number Diff line change @@ -34,16 +34,18 @@ <h1>📘 The Code Magazine</h1>
34
34
< header class ="post-header ">
35
35
< h2 > The Basic Language of the Web: HTML</ h2 >
36
36
37
- < img
38
- src ="img/laura-jones.jpg "
39
- alt ="Headshot of Laura Jones "
40
- height ="50 "
41
- width ="50 "
42
- />
37
+ < div class ="author-box ">
38
+ < img
39
+ src ="img/laura-jones.jpg "
40
+ alt ="Headshot of Laura Jones "
41
+ height ="50 "
42
+ width ="50 "
43
+ />
43
44
44
- < p id ="author ">
45
- Posted by < strong > Laura Jones</ strong > on Monday, June 21st 2027
46
- </ p >
45
+ < p id ="author " class ="author ">
46
+ Posted by < strong > Laura Jones</ strong > on Monday, June 21st 2027
47
+ </ p >
48
+ </ div >
47
49
48
50
< img
49
51
src ="img/post-img.jpg "
@@ -123,25 +125,29 @@ <h3>Why should you learn HTML?</h3>
123
125
< h4 > Related posts</ h4 >
124
126
125
127
< ul class ="related ">
126
- < li >
128
+ < li class =" related-post " >
127
129
< img
128
130
src ="img/related-1.jpg "
129
131
alt ="Person programming "
130
132
width ="75 "
131
133
height ="75 "
132
134
/>
133
- < a href ="# "> How to Learn Web Development</ a >
134
- < p class ="related-author "> By Jonas Schmedtmann</ p >
135
+ < div >
136
+ < a href ="# " class ="related-link "> How to Learn Web Development</ a >
137
+ < p class ="related-author "> By Jonas Schmedtmann</ p >
138
+ </ div >
135
139
</ li >
136
- < li >
140
+ < li class =" related-post " >
137
141
< img
138
142
src ="img/related-2.jpg "
139
143
alt ="Lightning "
140
144
width ="75 "
141
145
height ="75 "
142
146
/>
143
- < a href ="# "> The Unknown Powers of CSS</ a >
144
- < p class ="related-author "> By Jim Dillon</ p >
147
+ < div >
148
+ < a href ="# " class ="related-link "> The Unknown Powers of CSS</ a >
149
+ < p class ="related-author "> By Jim Dillon</ p >
150
+ </ div >
145
151
</ li >
146
152
< li >
147
153
< img
Original file line number Diff line number Diff line change 14
14
}
15
15
16
16
.container {
17
- width : 800 px ;
17
+ width : 1200 px ;
18
18
/* margin-left: auto;
19
19
margin-right: auto; */
20
20
margin : 0 auto;
26
26
padding-left: 40px;
27
27
padding-right: 40px; */
28
28
padding : 20px 40px ;
29
- margin-bottom : 60px ;
30
29
/* height: 80px; */
31
30
}
32
31
35
34
/* text-align: center; */
36
35
}
37
36
38
- article {
39
- margin-bottom : 60px ;
40
- }
41
-
42
37
.post-header {
43
38
margin-bottom : 40px ;
44
39
/* position: relative; */
@@ -51,7 +46,21 @@ aside {
51
46
/* padding-top: 50px;
52
47
padding-bottom: 50px; */
53
48
padding : 50px 0 ;
54
- width : 500px ;
49
+ }
50
+
51
+ .related-post {
52
+ display : flex;
53
+ align-items : center;
54
+ gap : 20px ;
55
+ margin-bottom : 30px ;
56
+ }
57
+
58
+ .related-link {
59
+ font-size : 17px ;
60
+ font-weight : bold;
61
+ font-style : normal;
62
+ margin-bottom : 5px ;
63
+ display : block;
55
64
}
56
65
57
66
/* SMALLER ELEMENTS */
@@ -124,8 +133,10 @@ li:last-child {
124
133
}
125
134
126
135
.related-author {
127
- font-size : 18px ;
128
- font-weight : bold;
136
+ margin-bottom : 0 ;
137
+ font-size : 14px ;
138
+ font-weight : normal;
139
+ font-style : italic;
129
140
}
130
141
131
142
/* ul {
@@ -136,14 +147,6 @@ li:last-child {
136
147
list-style : none;
137
148
}
138
149
139
- body {
140
- /* background-color: orangered; */
141
- }
142
-
143
- /* .first-li {
144
- font-weight: bold;
145
- } */
146
-
147
150
li : first-child {
148
151
font-weight : bold;
149
152
}
@@ -197,7 +200,6 @@ nav a:link {
197
200
display: block; */
198
201
199
202
margin-right : 30px ;
200
- margin-top : 10px ;
201
203
display : inline-block;
202
204
}
203
205
@@ -222,10 +224,6 @@ h1::first-letter {
222
224
margin-right : 5px ;
223
225
}
224
226
225
- h3 + p ::first-line {
226
- /* color: red; */
227
- }
228
-
229
227
h2 {
230
228
/* background-color: orange; */
231
229
position : relative;
@@ -265,3 +263,33 @@ footer p {
265
263
nav p {
266
264
font-size: 18px;
267
265
} */
266
+
267
+ .author-box {
268
+ display : flex;
269
+ align-items : center;
270
+ margin : 1rem 0 ;
271
+ }
272
+
273
+ .author {
274
+ margin-bottom : 0 ;
275
+ margin-left : 15px ;
276
+ }
277
+
278
+ .container {
279
+ display : grid;
280
+ grid-template-columns : 1fr 300px ;
281
+ column-gap : 75px ;
282
+ row-gap : 60px ;
283
+ align-items : start;
284
+ }
285
+
286
+ .main-header {
287
+ grid-column : 1 / -1 ;
288
+ display : flex;
289
+ justify-content : space-between;
290
+ align-items : center;
291
+ }
292
+
293
+ footer {
294
+ grid-column : 1 / -1 ;
295
+ }
You can’t perform that action at this time.
0 commit comments