Skip to content

Commit e803c2b

Browse files
committed
Completed Class and ID Selectors
1 parent e0e87f0 commit e803c2b

File tree

2 files changed

+25
-7
lines changed

2 files changed

+25
-7
lines changed

myWork/03-CSS-Fundamentals/index.html

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@ <h2>The Basic Language of the Web: HTML</h2>
2828
width="50"
2929
/>
3030

31-
<p>Posted by <strong>Laura Jones</strong> on Monday, June 21st 2027</p>
31+
<p class="author">
32+
Posted by <strong>Laura Jones</strong> on Monday, June 21st 2027
33+
</p>
3234

3335
<img
3436
src="images/post-img.jpg"
@@ -104,7 +106,7 @@ <h3>Why should you learn HTML?</h3>
104106

105107
<aside>
106108
<h4>Related posts</h4>
107-
<ul>
109+
<ul class="related">
108110
<li>
109111
<img
110112
src="images/related-1.jpg"
@@ -113,7 +115,7 @@ <h4>Related posts</h4>
113115
height="75"
114116
/>
115117
<a href="#">How to Learn Web Development</a>
116-
<p>By Jonas Schmedtmann</p>
118+
<p class="related-author">By Jonas Schmedtmann</p>
117119
</li>
118120
<li>
119121
<img
@@ -123,7 +125,7 @@ <h4>Related posts</h4>
123125
height="75"
124126
/>
125127
<a href="#">The Unknown Powers of CSS</a>
126-
<p>By Jim Dillon</p>
128+
<p class="related-author">By Jim Dillon</p>
127129
</li>
128130
<li>
129131
<img
@@ -133,11 +135,13 @@ <h4>Related posts</h4>
133135
height="75"
134136
/>
135137
<a href="#">Why JavaScript is Awesome</a>
136-
<p>By Matilda</p>
138+
<p class="related-author">By Matilda</p>
137139
</li>
138140
</ul>
139141
</aside>
140142

141-
<footer><p>Copyright &copy; 2027 by The Code Magazine.</p></footer>
143+
<footer>
144+
<p class="copyright">Copyright &copy; 2027 by The Code Magazine.</p>
145+
</footer>
142146
</body>
143147
</html>

myWork/03-CSS-Fundamentals/style.css

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,20 @@ li {
3636
font-size: 15px;
3737
}
3838

39-
footer p {
39+
.author {
40+
font-style: italic;
4041
font-size: 14px;
4142
}
43+
44+
.copyright {
45+
font-size: 14px;
46+
}
47+
48+
.related-author {
49+
font-size: 14px;
50+
font-weight: bold;
51+
}
52+
53+
.related {
54+
list-style: none;
55+
}

0 commit comments

Comments
 (0)