Skip to content

Commit b801a64

Browse files
committedSep 16, 2024
feat: css theory jonasschmedtmann#5 absolute positioning
1 parent e5d2c66 commit b801a64

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed
 

‎starter/03-CSS-Fundamentals/index.html

+2
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ <h2>The Basic Language of the Web: HTML</h2>
5252
height="200"
5353
class="post-img"
5454
/>
55+
56+
<button>Like 💖</button>
5557
</header>
5658

5759
<p>

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

+17
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ body {
1111
color: #444;
1212
font-family: sans-serif;
1313
border-top: 10px solid #1098ad;
14+
/* * Parent's of child with position: absolute */
15+
position: relative;
1416
}
1517

1618
.container {
@@ -19,6 +21,7 @@ body {
1921
/* margin-left: auto;
2022
margin-right: auto; */
2123
margin: 0 auto;
24+
/* position: relative; */
2225
}
2326

2427
.main-header {
@@ -40,6 +43,7 @@ article {
4043
}
4144
.post-header {
4245
margin-bottom: 40px;
46+
/* position: relative; */
4347
}
4448

4549
aside {
@@ -227,3 +231,16 @@ nav a:link {
227231
nav a:link:last-child {
228232
margin-right: 0px;
229233
}
234+
235+
button {
236+
font-size: 22px;
237+
padding: 20px;
238+
cursor: pointer;
239+
position: absolute;
240+
/* *Position 50px from the top and 50px from the left*/
241+
/* top: 50px;
242+
left: 50px; */
243+
/* *Position 50px from the bottom and 50px from the right*/
244+
bottom: 50px;
245+
right: 50px;
246+
}

0 commit comments

Comments
 (0)
Please sign in to comment.