Skip to content

Commit 4b1c704

Browse files
committed
Conflicts between selectors
1 parent db78232 commit 4b1c704

File tree

2 files changed

+34
-9
lines changed

2 files changed

+34
-9
lines changed

starter/03-CSS-Fundamentals/index.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,9 @@ <h4>Related posts</h4>
147147
</aside>
148148

149149
<footer>
150-
<p id="copyright">Copyright &copy; 2027 by The Code Magazine.</p>
150+
<p id="copyright" class="copyright text">
151+
Copyright &copy; 2027 by The Code Magazine.
152+
</p>
151153
</footer>
152154
</body>
153155
</html>

starter/03-CSS-Fundamentals/style.css

Lines changed: 31 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -90,30 +90,53 @@ li:last-child {
9090
font-style: italic;
9191
}
9292

93-
li:nth-child(even) {
94-
/* color: red; */
93+
li:nth-child(4) {
94+
color: red;
9595
}
96-
/* Misconeption it doesn't work */
97-
article p:first-child {
96+
97+
header p:nth-child(3) {
9898
color: red;
9999
}
100100

101+
/* Styling links */
101102
a:link {
102103
color: #1098ad;
103104
text-decoration: none;
104105
}
105106

106107
a:visited {
107-
color: #1098ad;
108-
text-transform: uppercase;
108+
color: pink;
109109
}
110110

111111
a:hover {
112+
color: orangered;
112113
font-weight: bold;
113-
text-decoration: underline wavy magenta;
114+
text-decoration: underline orangered;
114115
}
115116

116117
a:active {
118+
background-color: black;
117119
font-style: italic;
118-
background-color: cyan;
119120
}
121+
122+
.related:hover {
123+
background-color: purple;
124+
}
125+
126+
/* Resolving conflicts */
127+
128+
/* #copyright {
129+
color: red;
130+
}
131+
132+
.copyright {
133+
color: blue;
134+
}
135+
136+
.text {
137+
color: yellow;
138+
}
139+
140+
footer p {
141+
color: green !important;
142+
} */

0 commit comments

Comments
 (0)