- Interpreting the size of the object
- content < padding < boarder < margin
Centering on the page
- Viewport = browser, what you view.
- Different types of elements
- Block fills up the space to the right, has a new line before and after.
- Block examples: h2, p, div
- In-line examples: links, section
- "Child" elements - everything is always in context of its parents
- margin: 0px auto; --> makes the distance from the edge of the viewer on the sides to the start of the content the same no matter how small or large your window
- absolute positioning: absolute within container
- relative positioning: things within it move position to it.
In-line only takes up as much space as it takes to fill the content.
No comments:
Post a Comment