Skip to content

Commit 512c15d

Browse files
committed
Applied several different styles to the copyright paragraph inside footer, in order to resolve conflicts and see priority rules of css.
1 parent 460372f commit 512c15d

File tree

2 files changed

+22
-2
lines changed

2 files changed

+22
-2
lines changed

starter/03-CSS-Fundamentals/index.html

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,8 +154,10 @@ <h4>Related posts</h4>
154154
</aside>
155155

156156
<footer>
157-
<!-- using ids is not a good practice -->
158-
<p id="copyright">Copyright &copy; 2027 by The Code Magazine.</p>
157+
<!-- using ids and inline styles is not a good practice -->
158+
<p id="copyright" class="copyright text" style="color: #444">
159+
Copyright &copy; 2027 by The Code Magazine.
160+
</p>
159161
</footer>
160162
</body>
161163
</html>

starter/03-CSS-Fundamentals/style.css

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,3 +146,21 @@ a:active {
146146
background-color: black;
147147
font-style: italic;
148148
}
149+
150+
/* Resolving conflicts */
151+
#copyright {
152+
color: yellow;
153+
}
154+
155+
.copyright {
156+
color: red;
157+
}
158+
159+
.text {
160+
color: green;
161+
}
162+
163+
footer p {
164+
/* color: blue !important; << NOT A GOOD PRACTICE */
165+
color: blue;
166+
}

0 commit comments

Comments
 (0)