Skip to content

Commit e5d2c66

Browse files
committed
feat: css theory jonasschmedtmann#4 types of boxes (element's 'display' setting)
1 parent 94d9ad7 commit e5d2c66

File tree

1 file changed

+33
-4
lines changed

1 file changed

+33
-4
lines changed

starter/03-CSS-Fundamentals/style.css

Lines changed: 33 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
padding: 0;
77
}
88

9+
/* PAGE SECTIONS */
910
body {
1011
color: #444;
1112
font-family: sans-serif;
@@ -27,7 +28,7 @@ body {
2728
padding-right: 40px; */
2829
padding: 20px 40px;
2930
margin-bottom: 60px;
30-
height: 80px;
31+
/* height: 80px; */
3132
}
3233

3334
nav {
@@ -49,6 +50,8 @@ aside {
4950
padding: 50px 0px;
5051
width: 500px;
5152
}
53+
54+
/* SMALLER ELEMENTS */
5255
h1,
5356
h2,
5457
h3 {
@@ -82,6 +85,8 @@ p {
8285
font-size: 22px;
8386
line-height: 1.5;
8487
margin-bottom: 15px;
88+
/* * Convert the nav lin to Inline-Level elements */
89+
/* display: inline; */
8590
}
8691

8792
ul,
@@ -93,6 +98,8 @@ ol {
9398
li {
9499
font-size: 22px;
95100
margin-bottom: 10px;
101+
/* * Convert the nav lin to Inline-Level elements */
102+
/* display: inline; */
96103
}
97104

98105
li:last-child {
@@ -125,9 +132,10 @@ li:last-child {
125132
list-style: none;
126133
}
127134

128-
body {
129-
/* background-color: blue; */
130-
}
135+
/* body {
136+
background-color: blue;
137+
}
138+
*/
131139

132140
/* * Pseudo Class */
133141
li:first-child {
@@ -193,8 +201,29 @@ footer p {
193201
color: green;
194202
}
195203

204+
/* * Already is a inline-block box element*/
196205
.post-img {
197206
/* * Responsive Size*/
198207
width: 100%;
199208
height: auto;
209+
/* margin-top: 100px; */
210+
}
211+
212+
/* * Convert the nav link to Block-Level elements */
213+
/* nav a:link {
214+
background-color: orangered;
215+
margin: 20px;
216+
padding: 20px;
217+
display: block;
218+
} */
219+
220+
/* * Convert the nav link to Inline-Block Level elements */
221+
nav a:link {
222+
margin-right: 30px;
223+
margin-top: 10px;
224+
display: inline-block;
225+
}
226+
227+
nav a:link:last-child {
228+
margin-right: 0px;
200229
}

0 commit comments

Comments
 (0)