This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
en:web_development:layout:position [2021/12/12 09:58] mag [Overflow] |
en:web_development:layout:position [2023/08/16 09:33] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Web Development Lesson | + | ====== Web Development Lesson |
===== Forced Positioning ===== | ===== Forced Positioning ===== | ||
==== Objective ==== | ==== Objective ==== | ||
Line 34: | Line 34: | ||
border: darkblue solid 2px; | border: darkblue solid 2px; | ||
}</ | }</ | ||
- | * Now open ' | + | * Now open ' |
* All four elements fill the screen from left to right, wrapping their content tightly at left, top and bottom and they are stacked on top of each other in the order we've placed them. | * All four elements fill the screen from left to right, wrapping their content tightly at left, top and bottom and they are stacked on top of each other in the order we've placed them. | ||
* You could use these for any content you like, but of course it's easier for you and anyone you might work with to follow if you use them as named. | * You could use these for any content you like, but of course it's easier for you and anyone you might work with to follow if you use them as named. | ||
Line 96: | Line 96: | ||
==== Fixed Positioning ==== | ==== Fixed Positioning ==== | ||
- | * There' | + | * Let' |
+ | < | ||
+ | <div class=" | ||
+ | <div class=" | ||
+ | <div class=" | ||
+ | </ | ||
+ | * Now let's make it look like it contains | ||
+ | < | ||
+ | background-color: | ||
+ | border: | ||
+ | height: 400px; | ||
+ | }</ | ||
+ | * Notice that the < | ||
+ | * | ||
< | < | ||
background-color: | background-color: | ||
Line 119: | Line 132: | ||
==== Overflow ==== | ==== Overflow ==== | ||
- | * There' | + | * There' |
- | < | + | |
- | <div class=" | + | |
- | <div class=" | + | |
- | <div class=" | + | |
- | </ | + | |
- | * Now let's make it look like it contains a lot of information. Add the following to you CSS code. | + | |
- | < | + | |
- | background-color: | + | |
- | border: | + | |
- | height: 400px; | + | |
- | }</ | + | |
* Scroll the page and see that our orange Content section overflows < | * Scroll the page and see that our orange Content section overflows < | ||
* When you're ready, let's add a scroll bar to < | * When you're ready, let's add a scroll bar to < |