File tree Expand file tree Collapse file tree 2 files changed +80
-7
lines changed
starter/03-CSS-Fundamentals Expand file tree Collapse file tree 2 files changed +80
-7
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ <h6>The Basic Language of the Web: HTML</h6>
18
18
-->
19
19
20
20
< div class ="container ">
21
- < header class ="main-header ">
21
+ < header class ="main-header clearfix ">
22
22
< h1 > 📘 The Code Magazine</ h1 >
23
23
24
24
< nav >
@@ -29,6 +29,8 @@ <h1>📘 The Code Magazine</h1>
29
29
< a href ="# "> Flexbox</ a >
30
30
< a href ="# "> CSS Grid</ a >
31
31
</ nav >
32
+
33
+ <!-- <div class="clear"></div> -->
32
34
</ header >
33
35
34
36
< article >
@@ -40,9 +42,10 @@ <h2>The Basic Language of the Web: HTML</h2>
40
42
alt ="Headshot of Laura Jones "
41
43
height ="50 "
42
44
width ="50 "
45
+ class ="author-img "
43
46
/>
44
47
45
- < p id ="author ">
48
+ < p id ="author " class =" author " >
46
49
Posted by < strong > Laura Jones</ strong > on Monday, June 21st 2027
47
50
</ p >
48
51
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; /* Centers the container */
25
26
background-color : # f7f7f7 ;
26
27
padding : 20px 40px ;
27
28
margin-bottom : 60px ;
28
- height : 80px ;
29
+ /* height: 80px; */
29
30
}
30
31
31
32
article {
@@ -34,7 +35,7 @@ article {
34
35
35
36
nav {
36
37
font-size : 18px ;
37
- text-align : center;
38
+ /* text-align: center; */
38
39
}
39
40
40
41
.post-header {
@@ -48,8 +49,7 @@ aside {
48
49
border-bottom : 5px solid # 1098ad ;
49
50
/* padding-top: 50px;
50
51
padding-bottom: 50px; */
51
- padding : 50px 0 ;
52
- width : 500px ;
52
+ padding : 50px 40px ;
53
53
}
54
54
55
55
/* SMALLER SECTIONS */
68
68
69
69
h2 {
70
70
font-size : 40px ;
71
+ margin-bottom : 30px ;
71
72
}
72
73
73
74
h3 {
80
81
font-size : 20px ;
81
82
text-transform : uppercase;
82
83
text-align : center;
84
+ margin-bottom : 30px ;
83
85
}
84
86
85
87
p {
@@ -127,6 +129,7 @@ li:last-child {
127
129
128
130
.related {
129
131
list-style : none;
132
+ margin-left : 0 ;
130
133
}
131
134
132
135
/* .first-li {
@@ -335,3 +338,70 @@ position: absolute
335
338
*/
336
339
337
340
/* Stopped at Developer Skill #1: Googling and Reading Documentation */
341
+
342
+ /* CSS Layouts will still be done here */
343
+
344
+ /* FLOATS */
345
+ /*
346
+
347
+ ** Floats are different from absolute positioning
348
+
349
+ - Element is removed from the normal flow: "out of flow"
350
+ - Text and inline elements will wrap around the floated element
351
+ - The container will not adjust its height to the element *collapsing element or collapsed height
352
+
353
+ float: left;
354
+ float: right;
355
+
356
+ */
357
+ .author-img {
358
+ float : left;
359
+ margin-bottom : 20px ;
360
+ }
361
+
362
+ .author {
363
+ float : left;
364
+ margin-top : 10px ;
365
+ margin-left : 20px ;
366
+ }
367
+
368
+ h1 {
369
+ float : left;
370
+ }
371
+
372
+ nav {
373
+ float : right;
374
+ }
375
+
376
+ .clear {
377
+ clear : both;
378
+ }
379
+
380
+ .clearfix ::after {
381
+ clear : both;
382
+ content : "" ;
383
+ display : block;
384
+ }
385
+
386
+ article {
387
+ width : 825px ;
388
+ float : left;
389
+ }
390
+
391
+ aside {
392
+ width : 300px ;
393
+ float : right;
394
+ }
395
+
396
+ footer {
397
+ clear : both;
398
+ }
399
+
400
+ /* THE BOX MODEL WITH BOX-SIZING: BORDER BOX */
401
+ /*
402
+
403
+ box-sizing: border-box;
404
+
405
+ */
406
+
407
+ /* Stopped at Challenge #1: CSS Layouts */
You can’t perform that action at this time.
0 commit comments