Skip to content

Commit a31c908

Browse files
committed
adjacent sibling
1 parent 5729b95 commit a31c908

File tree

2 files changed

+30
-7
lines changed

2 files changed

+30
-7
lines changed

starter/02-HTML-Fundamentals/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@ <h4>Related posts</h4>
149149
</li>
150150
</ul>
151151
</aside>
152+
<button class="like">Like ❤</button>
152153
<footer>Copyright &copy; 2027 by The Code Magazine.</footer>
153154
</div>
154155
</body>

starter/02-HTML-Fundamentals/style.css

Lines changed: 29 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,15 @@
88
body {
99
color: #444;
1010
font-family: sans-serif;
11-
1211
border-top: 10px solid #1098ad;
13-
position: relative;
1412
}
1513

1614
.container {
17-
width: 1200px;
15+
width: 900px;
1816
/* margin: 0 auto;*/
1917
margin-left: auto;
2018
margin-right: auto;
19+
position: relative;
2120
}
2221

2322
.main-header {
@@ -138,10 +137,6 @@ li:last-child {
138137
list-style: none;
139138
}
140139

141-
body {
142-
/* background-color: orangered; */
143-
}
144-
145140
/* .first-li {
146141
font-weight: bold;
147142
} */
@@ -202,3 +197,30 @@ a:active {
202197
display: inline-block;
203198
margin: 20px;
204199
}
200+
201+
.like {
202+
width: 50px;
203+
height: 50px;
204+
padding: 10px;
205+
position: absolute;
206+
top: 20px;
207+
right: 40px;
208+
border-radius: 10px;
209+
}
210+
211+
/*Pseudo Elements with :: Pseudo Class with :*/
212+
213+
h1::first-letter {
214+
font-style: normal;
215+
margin-right: 10px;
216+
}
217+
218+
a::first-line {
219+
background-color: orangered;
220+
}
221+
222+
h3 + p::first-line {
223+
color: white;
224+
background-color: black;
225+
font-size: 10px;
226+
}

0 commit comments

Comments
 (0)