Skip to content

Commit c5de468

Browse files
committed
absolute and relative positioning
1 parent 58bf3e1 commit c5de468

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

starter/03-CSS-Fundamentals/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ <h4>Related posts</h4>
122122
width="75"
123123
width="75"
124124
/>
125+
<button class="like-btn">❤️Like</button>
125126
<a href="#">How to Learn Web Development</a>
126127
<p class="related-authors">By Jonas Schmedtmann</p>
127128
</li>

starter/03-CSS-Fundamentals/style.css

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
}
66

77
body {
8+
/* position: relative; */
89
color: #444;
910
font-family: sans-serif;
1011

@@ -86,6 +87,7 @@ aside {
8687
}
8788

8889
.container {
90+
position: relative;
8991
width: 700px;
9092
/* margin-left: auto;
9193
margin-right: auto; */
@@ -176,3 +178,21 @@ nav {
176178
width: 100%;
177179
height: auto;
178180
}
181+
182+
nav a:link {
183+
padding-right: 30px;
184+
}
185+
186+
.like-btn {
187+
position: absolute;
188+
189+
font-size: 20px;
190+
padding: 20px;
191+
margin: 10px;
192+
cursor: pointer;
193+
194+
/* top: 0;
195+
left: 0; */
196+
bottom: 0;
197+
right: 0;
198+
}

0 commit comments

Comments
 (0)