Skip to content

Commit 75262a5

Browse files
committed
Added some basic styles inheritance by applying some styles into body element, as well as nav element.
1 parent 512c15d commit 75262a5

File tree

2 files changed

+15
-7
lines changed

2 files changed

+15
-7
lines changed

starter/03-CSS-Fundamentals/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ <h6>The Basic Language of the Web: HTML</h6>
2020
<h1>📘 The Code Magazine</h1>
2121

2222
<nav>
23+
<!-- <strong>This is navigation</strong> -->
2324
<a href="blog.html">Blog</a>
2425
<a href="#">Challenges</a>
2526
<a href="#">Flexbox</a>

starter/03-CSS-Fundamentals/style.css

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
h1,
2-
h2,
3-
h3,
4-
h4,
5-
p,
6-
li {
7-
font-family: sans-serif;
1+
* {
2+
/* border-top: 10px solid #1098ad; */
3+
}
4+
5+
/* Inheritance example */
6+
body {
87
color: #444;
8+
font-family: sans-serif;
9+
border-top: 10px solid #1098ad;
910
}
1011

1112
h1,
@@ -100,6 +101,7 @@ a {
100101
font-weight: bold;
101102
} */
102103

104+
/* Pseudo Classes */
103105
li:first-child {
104106
font-weight: bold;
105107
}
@@ -164,3 +166,8 @@ footer p {
164166
/* color: blue !important; << NOT A GOOD PRACTICE */
165167
color: blue;
166168
}
169+
170+
/* Inheritance example */
171+
nav {
172+
font-size: 18px;
173+
}

0 commit comments

Comments
 (0)