Skip to content

Commit 25f13e8

Browse files
committed
Added a like button, with absolute positioning, relative to the body.
1 parent f42b29b commit 25f13e8

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

starter/03-CSS-Fundamentals/index.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ <h2>The Basic Language of the Web: HTML</h2>
5454
height="200"
5555
class="post-image"
5656
/>
57+
58+
<button class="like-button">❤ Like</button>
5759
</header>
5860

5961
<p>

starter/03-CSS-Fundamentals/style.css

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,15 @@ body {
99
color: #444;
1010
font-family: sans-serif;
1111
border-top: 10px solid #1098ad;
12+
position: relative;
1213
}
1314

1415
.container {
1516
width: 800px;
1617
/* margin-left: auto;
1718
margin-right: auto; */
1819
margin: 0 auto;
20+
/* position: relative; */
1921
}
2022

2123
.main-header {
@@ -35,6 +37,7 @@ nav {
3537

3638
.post-header {
3739
margin-bottom: 40px;
40+
/* position: relative; */
3841
}
3942

4043
article {
@@ -216,6 +219,18 @@ nav a:link:last-child {
216219
margin-right: 0;
217220
}
218221

222+
.like-button {
223+
font-size: 22px;
224+
padding: 20px;
225+
cursor: pointer;
226+
227+
position: absolute;
228+
/* top: 50px;
229+
left: 50px; */
230+
bottom: 50px;
231+
right: 50px;
232+
}
233+
219234
/* Resolving conflicts */
220235
#copyright {
221236
color: yellow;

0 commit comments

Comments
 (0)