Skip to content

Commit 1005190

Browse files
committed
class and id selectors
1 parent 308bb3c commit 1005190

File tree

2 files changed

+28
-10
lines changed

2 files changed

+28
-10
lines changed

starter/03-CSS-Fundamentals/index.html

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ <h1>📘 The Code Magazine</h1>
2525
<a href="#">Flexbox</a>
2626
<a href="#">CSS Grid</a>
2727
</nav>
28-
<p>TEst paragraph</p>
28+
<p>Test paragraph</p>
2929
</header>
3030

3131
<article>
@@ -39,7 +39,9 @@ <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">
43+
Posted by <strong>Laura Jones</strong> on Monday, June 21st 2027
44+
</p>
4345

4446
<img
4547
src="img/post-img.jpg"
@@ -114,7 +116,7 @@ <h3>Why should you learn HTML?</h3>
114116
<aside>
115117
<h4>Related posts</h4>
116118

117-
<ul>
119+
<ul class="related">
118120
<li>
119121
<img
120122
src="img/related-1.jpg"
@@ -123,12 +125,12 @@ <h4>Related posts</h4>
123125
width="75"
124126
/>
125127
<a href="#">How to Learn Web Development</a>
126-
<p>By Jonas Schmedtmann</p>
128+
<p class="related-author">By Jonas Schmedtmann</p>
127129
</li>
128130
<li>
129131
<img src="img/related-2.jpg" alt="Lightning" width="75" heigth="75" />
130132
<a href="#">The Unknown Powers of CSS</a>
131-
<p>By Jim Dillon</p>
133+
<p class="related-author">By Jim Dillon</p>
132134
</li>
133135
<li>
134136
<img
@@ -138,11 +140,13 @@ <h4>Related posts</h4>
138140
height="75"
139141
/>
140142
<a href="#">Why JavaScript is Awesome</a>
141-
<p>By Matilda</p>
143+
<p class="related-author">By Matilda</p>
142144
</li>
143145
</ul>
144146
</aside>
145147

146-
<footer><p>Copyright &copy; 2027 by The Code Magazine.</p></footer>
148+
<footer>
149+
<p id="copyright">Copyright &copy; 2027 by The Code Magazine.</p>
150+
</footer>
147151
</body>
148152
</html>

starter/03-CSS-Fundamentals/style.css

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

35-
footer p {
35+
/* footer p {
3636
font-size: 16px;
37-
}
38-
article header p {
37+
} */
38+
/* article header p {
39+
font-style: italic;
40+
} */
41+
#author {
3942
font-style: italic;
43+
font-size: 18px;
44+
}
45+
#copyright {
46+
font-size: 16px;
47+
}
48+
.related-author {
49+
font-size: 18px;
50+
font-weight: bold;
51+
}
52+
.related {
53+
list-style: none;
4054
}

0 commit comments

Comments
 (0)