Skip to content

Commit b8b841e

Browse files
committed
vid 39 done
1 parent 7c64451 commit b8b841e

File tree

3 files changed

+43
-0
lines changed

3 files changed

+43
-0
lines changed

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,20 @@ Use starter code to start each section, and **final code to compare it with your
7272
- the margin will be the size of the larger margin
7373
- this is a feature of CSS
7474
- it does not happen with padding or border
75+
- There are two kind of elements in the box model: block and inline
76+
- block elements: elements that always start on a new line and take up the full width available
77+
- ex: div, h1, p, form, etc
78+
- by default, block elements have a width of 100%
79+
- inline elements: elements that do not start on a new line and only take up as much width as necessary
80+
- ex: span, a, img, etc
81+
- width and height properties have no effect on inline elements
82+
- padding, margin, and border properties can be applied to inline elements (only horizontally)
83+
- `display: block;` can make an inline element be rendered as a block element
84+
- `display: inline-block;`: looks like inline from outside, behave like block element on the inside
85+
- it won't create line breaks
86+
- it takes up only as much width as necessary for the content
87+
- all box model properties can be applied to inline-block elements
88+
- an `<img>` element is by default an inline-block element
7589

7690
# Useful Links
7791
- https://jonas.io/resources/

starter/03-CSS-Fundamentals/index.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ <h1>📘 The Code Magazine</h1>
2525
<a href="#">Challenges</a>
2626
<a href="#">Flexbox</a>
2727
<a href="#">CSS Grid</a>
28+
<a href="./challange/">Challange</a>
2829
</nav>
2930
</header>
3031

@@ -155,5 +156,8 @@ <h4>Related posts</h4>
155156
<p>Copyright &copy; 2027 by The Code Magazine.</p>
156157
</footer>
157158
</div>
159+
<div class="like-button-container">
160+
<button class="like-button">❤️ Like</button>
161+
</div>
158162
</body>
159163
</html>

starter/03-CSS-Fundamentals/style.css

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,16 @@ body {
1010
color: #444444;
1111
}
1212

13+
nav a:link {
14+
margin-right: 30px;
15+
margin-top: 10px;
16+
display: inline-block;
17+
}
18+
19+
nav a:link:last-child {
20+
margin-right: 0;
21+
}
22+
1323
.container {
1424
width: 700px;
1525
border-top: 10px solid #1098ad;
@@ -157,3 +167,18 @@ a:active {
157167
font-style: italic;
158168
}
159169
/* LVHA */
170+
171+
.like-button-container {
172+
position: relative;
173+
/* height: 100px; */
174+
background-color: red;
175+
}
176+
.like-button {
177+
font-size: 22px;
178+
padding: 20px;
179+
cursor: pointer;
180+
181+
position: absolute;
182+
bottom: 50px;
183+
right: 50px;
184+
}

0 commit comments

Comments
 (0)