File tree Expand file tree Collapse file tree 2 files changed +64
-10
lines changed Expand file tree Collapse file tree 2 files changed +64
-10
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,8 @@ <h6>The Basic Language of the Web: HTML</h6>
18
18
-->
19
19
20
20
< div class ="container ">
21
- < header class ="main-header ">
21
+ <!--Agregamos otra clase "clearfix" -->
22
+ < header class ="main-header clearfix ">
22
23
< h1 > 📘 The Code Magazine</ h1 >
23
24
24
25
< nav >
@@ -28,6 +29,10 @@ <h1>📘 The Code Magazine</h1>
28
29
< a href ="# "> Flexbox</ a >
29
30
< a href ="# "> CSS Grid</ a >
30
31
</ nav >
32
+
33
+ <!--Creamos este div para limpiar floats - No es buena práctica-->
34
+
35
+ <!-- <div class="clear"></div> -->
31
36
</ header >
32
37
33
38
< article >
@@ -39,9 +44,10 @@ <h2>The Basic Language of the Web: HTML</h2>
39
44
alt ="Headshot of Laura Jones "
40
45
height ="50 "
41
46
width ="50 "
47
+ class ="author-img "
42
48
/>
43
49
44
- < p id ="author ">
50
+ < p id ="author " class =" author " >
45
51
Posted by < strong > Laura Jones</ strong > on Monday, June 21st 2027
46
52
</ p >
47
53
Original file line number Diff line number Diff line change 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,7 @@ 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 ;
55
53
}
56
54
57
55
/* SMALLER ELEMENTS */
82
80
font-size : 20px ;
83
81
text-transform : uppercase;
84
82
text-align : center;
83
+ margin-bottom : 30px ;
85
84
}
86
85
87
86
p {
@@ -134,11 +133,12 @@ li:last-child {
134
133
135
134
.related {
136
135
list-style : none;
136
+ margin-left : 0 ;
137
137
}
138
138
139
- body {
140
- /* background-color: orangered; */
141
- }
139
+ /* body {
140
+ background-color: orangered;
141
+ } */
142
142
143
143
/* .first-li {
144
144
font-weight: bold;
@@ -265,3 +265,51 @@ footer p {
265
265
nav p {
266
266
font-size: 18px;
267
267
} */
268
+
269
+ /* FLOATS */
270
+
271
+ .author-img {
272
+ float : left;
273
+ margin-bottom : 20px ;
274
+ }
275
+
276
+ .author {
277
+ /* padding-left: 80px; */
278
+ float : left;
279
+ margin-top : 10px ;
280
+ margin-left : 20px ;
281
+ }
282
+
283
+ h1 {
284
+ float : left;
285
+ }
286
+
287
+ nav {
288
+ float : right;
289
+ }
290
+
291
+ .clear {
292
+ clear : both;
293
+ }
294
+
295
+ /* Clearfix method - psedo elements after and before are inline elements*/
296
+
297
+ .clearfix ::after {
298
+ content : "" ;
299
+ display : block;
300
+ clear : both;
301
+ }
302
+
303
+ article {
304
+ width : 825px ;
305
+ float : left;
306
+ }
307
+
308
+ aside {
309
+ width : 300px ;
310
+ float : right;
311
+ }
312
+
313
+ footer {
314
+ clear : both;
315
+ }
You can’t perform that action at this time.
0 commit comments