Skip to content

Commit 1b18f29

Browse files
committed
did moar stuff
1 parent 140d07b commit 1b18f29

File tree

2 files changed

+38
-8
lines changed

2 files changed

+38
-8
lines changed

projectfolder/02-HTML-Fundamentals/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ <h4><strong>Related Posts</strong></h4>
103103
</aside>
104104

105105
<footer>
106-
<p id="copyright">Copyright &copy 2017 by The Code Magazine</p>
106+
<p id="copyright" class="copyright text">Copyright &copy 2017 by The Code Magazine</p>
107107
</footer>
108108
</body>
109109
</html>

projectfolder/02-HTML-Fundamentals/style.css

Lines changed: 37 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
1-
h1,
2-
h2,
3-
h3,
4-
h4,
5-
p,
6-
li {
7-
font-family: sans-serif;
1+
body {
82
color: #444;
3+
font-family: sans-serif;
94
}
105

116
h1,
@@ -123,3 +118,38 @@ a:active {
123118
background-color: black;
124119
font-style: italic;
125120
}
121+
122+
/* Resolving conflicts */
123+
/*
124+
footer p {
125+
color: blue !important;
126+
}
127+
*/
128+
129+
/* #copyright {
130+
color: red;
131+
} */
132+
133+
/* .copyright {
134+
color: blue;
135+
}
136+
137+
.text {
138+
color: yellow;
139+
}
140+
141+
footer p {
142+
color: green;
143+
} */
144+
145+
/* In this situation, this falls to the hierarchy of importance. ID (#) will always have priority over classes (.) and child elements (footer p). In a situation where both have the same hierarchy (the case with .copyright and .text) then the last one will become the priority, in this case the text became yellow instead of blue
146+
147+
Priority List 1 -> 10
148+
High to Low
149+
1 -> !important
150+
2 -> inline styling
151+
3 -> #
152+
4 -> .
153+
5 -> child element
154+
155+
*/

0 commit comments

Comments
 (0)