Skip to content

Commit 8edcadb

Browse files
committed
final css fundamentals
1 parent bd7e292 commit 8edcadb

File tree

2 files changed

+79
-10
lines changed

2 files changed

+79
-10
lines changed

starter/03-CSS-Fundamentals/css/style.css

Lines changed: 67 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@ h4,
55
p,
66
li {
77
font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
8+
color: #444;
9+
}
10+
11+
h1,
12+
h2,
13+
h3 {
14+
color: #1098ad;
815
}
916

1017
h1 {
@@ -36,11 +43,69 @@ li {
3643
font-size: 20px;
3744
}
3845

39-
footer p {
46+
/* footer p {
47+
font-size: 16px;
48+
text-align: center;
49+
} */
50+
51+
#copyright {
4052
font-size: 16px;
4153
text-align: center;
4254
}
4355

44-
header p {
56+
#author {
57+
font-style: italic;
58+
font-size: 18px;
59+
}
60+
61+
.related-author {
62+
font-style: italic;
63+
font-weight: bold;
64+
font-family: "Franklin Gothic Medium", "Arial Narrow", Arial, sans-serif;
65+
font-size: 18px;
66+
}
67+
68+
.related {
69+
list-style: none;
70+
}
71+
72+
.main-header {
73+
background-color: #f7f7f7;
74+
}
75+
76+
aside {
77+
background-color: #f7f7f7;
78+
border-top: 5px solid #1098ad;
79+
border-bottom: 5px solid #1098ad;
80+
}
81+
82+
.border {
83+
border-bottom: 5px solid #3a3b3b;
84+
}
85+
86+
li:first-child {
87+
font-weight: bold;
88+
}
89+
90+
li:last-child {
4591
font-style: italic;
4692
}
93+
94+
li:nth-child(even) {
95+
/* color: red; */
96+
}
97+
98+
/* Style Hyperlinks */
99+
a:link {
100+
color: #1098ad;
101+
text-decoration: none;
102+
}
103+
104+
a:visited {
105+
color: #1098ad;
106+
}
107+
108+
a:hover {
109+
color: orangered;
110+
font-weight: bold;
111+
}

starter/03-CSS-Fundamentals/index.html

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
</head>
88

99
<body>
10-
<header>
10+
<header class="main-header">
1111
<h1>📘 The Code Magazine</h1>
1212

1313
<nav>
@@ -20,7 +20,7 @@ <h1>📘 The Code Magazine</h1>
2020

2121
<article>
2222
<header>
23-
<h2>The Basic Language of the Web: HTML</h2>
23+
<h2 class="border">The Basic Language of the Web: HTML</h2>
2424

2525
<img
2626
src="img/laura-jones.jpg"
@@ -29,7 +29,9 @@ <h2>The Basic Language of the Web: HTML</h2>
2929
width="50"
3030
/>
3131

32-
<p>Posted by <strong>Laura Jones</strong> on Monday, June 21st 2027</p>
32+
<p id="author">
33+
Posted by <strong>Laura Jones</strong> on Monday, June 21st 2027
34+
</p>
3335

3436
<img
3537
src="img/post-img.jpg"
@@ -104,7 +106,7 @@ <h3>Why should you learn HTML?</h3>
104106
<aside>
105107
<h4>Related posts</h4>
106108

107-
<ul>
109+
<ul class="related">
108110
<li>
109111
<img
110112
src="img/related-1.jpg"
@@ -113,12 +115,12 @@ <h4>Related posts</h4>
113115
width="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 src="img/related-2.jpg" alt="Lightning" width="75" heigth="75" />
120122
<a href="#">The Unknown Powers of CSS</a>
121-
<p>By Jim Dillon</p>
123+
<p class="related-author">By Jim Dillon</p>
122124
</li>
123125
<li>
124126
<img
@@ -128,11 +130,13 @@ <h4>Related posts</h4>
128130
height="75"
129131
/>
130132
<a href="#">Why JavaScript is Awesome</a>
131-
<p>By Matilda</p>
133+
<p class="related-author">By Matilda</p>
132134
</li>
133135
</ul>
134136
</aside>
135137

136-
<footer><p>Copyright &copy; 2027 by The Code Magazine.</p></footer>
138+
<footer>
139+
<p id="copyright">Copyright &copy; 2027 by The Code Magazine.</p>
140+
</footer>
137141
</body>
138142
</html>

0 commit comments

Comments
 (0)