File tree Expand file tree Collapse file tree 3 files changed +45
-10
lines changed Expand file tree Collapse file tree 3 files changed +45
-10
lines changed Original file line number Diff line number Diff line change 6
6
< meta name ="viewport " content ="width=device-width, initial-scale=1.0 " />
7
7
< title > Flexbox</ title >
8
8
< style >
9
+
9
10
.el--1 {
10
11
background-color : blueviolet;
12
+ align-self : flex-start;
13
+ order : 2 ;
11
14
}
12
15
.el--2 {
13
16
background-color : orangered;
18
21
}
19
22
.el--4 {
20
23
background-color : goldenrod;
24
+ align-self : flex-end;
21
25
}
22
26
.el--5 {
23
27
background-color : palevioletred;
28
+ order : 1 ; /*moves items to the end.*/
24
29
}
25
30
.el--6 {
26
31
background-color : steelblue;
32
+ order : -1 ; /*moves items to the beginning of the list; all default to zero.*/
27
33
}
28
34
.el--7 {
29
35
background-color : yellow;
36
42
/* STARTER */
37
43
font-family : sans-serif;
38
44
background-color : # ddd ;
39
- font-size : 40 px ;
45
+ font-size : 34 px ;
40
46
margin : 40px ;
41
47
42
48
/* FLEXBOX */
49
+ display : flex;
50
+ align-items : center;
51
+ /*A flex container will be as tall as the tallest element in it.*/
52
+ justify-content : flex-start;
53
+ gap : 30px ;
43
54
}
44
55
</ style >
45
56
</ head >
Original file line number Diff line number Diff line change @@ -25,13 +25,13 @@ <h1>📘 The Code Magazine</h1>
25
25
<!-- <strong>This is the navigation</strong> -->
26
26
< a href ="blog.html "> Blog</ a >
27
27
< a href ="# "> Challenges</ a >
28
- < a href ="# "> Flexbox</ a >
29
- < a href ="# "> CSS Grid</ a >
28
+ < a href ="flexbox.html "> Flexbox</ a >
29
+ < a href ="css-grid.html "> CSS Grid</ a >
30
30
</ nav >
31
31
</ header >
32
32
33
33
< article >
34
- < header class ="post-header ">
34
+ < header class ="post-header clearfix ">
35
35
< h2 > The Basic Language of the Web: HTML</ h2 >
36
36
37
37
< img
Original file line number Diff line number Diff line change
1
+ /**/
1
2
* {
2
- /* border-top: 10px solid #1098ad; */
3
3
margin : 0 ;
4
4
padding : 0 ;
5
+ box-sizing : border-box;
5
6
}
6
7
7
8
/* PAGE SECTIONS */
14
15
}
15
16
16
17
.container {
17
- width : 800 px ;
18
+ width : 1200 px ;
18
19
/* margin-left: auto;
19
20
margin-right: auto; */
20
21
margin : 0 auto;
@@ -48,10 +49,8 @@ aside {
48
49
background-color : # f7f7f7 ;
49
50
border-top : 5px solid # 1098ad ;
50
51
border-bottom : 5px solid # 1098ad ;
51
- /* padding-top: 50px;
52
- padding-bottom: 50px; */
53
- padding : 50px 0 ;
54
- width : 500px ;
52
+ padding : 50px 40px ;
53
+ box-sizing : border-box;
55
54
}
56
55
57
56
/* SMALLER ELEMENTS */
82
81
font-size : 20px ;
83
82
text-transform : uppercase;
84
83
text-align : center;
84
+ margin-bottom : 30px ;
85
85
}
86
86
87
87
p {
@@ -134,6 +134,7 @@ li:last-child {
134
134
135
135
.related {
136
136
list-style : none;
137
+ margin : 0 ;
137
138
}
138
139
139
140
body {
@@ -265,3 +266,26 @@ footer p {
265
266
nav p {
266
267
font-size: 18px;
267
268
} */
269
+
270
+ .clearfix ::after {
271
+ clear : both;
272
+ content : "" ;
273
+ display : block;
274
+ }
275
+
276
+ article {
277
+ background-color : green;
278
+ width : 70% ;
279
+ float : left;
280
+ }
281
+
282
+ aside {
283
+ background-color : red;
284
+ width : 25% ;
285
+ float : right;
286
+ }
287
+
288
+ footer {
289
+ background-color : yellow;
290
+ clear : both;
291
+ }
You can’t perform that action at this time.
0 commit comments