Skip to content

Commit b83bad2

Browse files
committed
section-3: Make styling more robust.
1 parent 800ad52 commit b83bad2

File tree

2 files changed

+31
-9
lines changed

2 files changed

+31
-9
lines changed

starter/03-CSS-Fundamentals/index.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ <h2>The Basic Language of the Web: HTML</h2>
3939
width="50"
4040
/>
4141

42-
<p>Posted by <strong>Laura Jones</strong> on Monday, June 21st 2027</p>
42+
<p id="author">Posted by <strong>Laura Jones</strong> on Monday, June 21st 2027</p>
4343

4444
<img
4545
src="img/post-img.jpg"
@@ -114,7 +114,7 @@ <h3>Why should you learn HTML?</h3>
114114
<aside>
115115
<h4>Related posts</h4>
116116

117-
<ul>
117+
<ul class="related-posts">
118118
<li>
119119
<img
120120
src="img/related-1.jpg"
@@ -123,12 +123,12 @@ <h4>Related posts</h4>
123123
width="75"
124124
/>
125125
<a href="#">How to Learn Web Development</a>
126-
<p>By Jonas Schmedtmann</p>
126+
<p class="related-author">By Jonas Schmedtmann</p>
127127
</li>
128128
<li>
129129
<img src="img/related-2.jpg" alt="Lightning" width="75" heigth="75" />
130130
<a href="#">The Unknown Powers of CSS</a>
131-
<p>By Jim Dillon</p>
131+
<p class="related-author">By Jim Dillon</p>
132132
</li>
133133
<li>
134134
<img
@@ -138,13 +138,13 @@ <h4>Related posts</h4>
138138
height="75"
139139
/>
140140
<a href="#">Why JavaScript is Awesome</a>
141-
<p>By Matilda</p>
141+
<p class="related-author">By Matilda</p>
142142
</li>
143143
</ul>
144144
</aside>
145145

146146
<footer>
147-
<p>Copyright &copy; 2027 by The Code Magazine.</p>
147+
<p id="copyright">Copyright &copy; 2027 by The Code Magazine.</p>
148148
</footer>
149149
</body>
150150
</html>

starter/03-CSS-Fundamentals/style.css

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,32 @@ li {
3232
font-size: 20px;
3333
}
3434

35-
footer p {
35+
/* ul {
36+
list-style: none;
37+
} */
38+
39+
/* footer p {
3640
font-size: 16px;
37-
}
41+
} */
42+
43+
/* article header p {
44+
font-style: italic;
45+
} */
3846

39-
article header p {
47+
#author {
4048
font-style: italic;
49+
font-size: 18px;
50+
}
51+
52+
#copyright {
53+
font-size: 16px;
54+
}
55+
56+
.related-author {
57+
font-size: 18px;
58+
font-weight: bold;
59+
}
60+
61+
.related-posts {
62+
list-style: none;
4163
}

0 commit comments

Comments
 (0)