divs update

This commit is contained in:
Jacob Delgado 2023-04-25 02:34:08 -07:00
parent acdd28c2b0
commit cb592ef819

View File

@ -819,4 +819,15 @@ p {
- Would you use `margin` or `padding` if you wanted two elements to overlap each other?
- You would use `margin` since it's the space between elements and it can also be negative space.
### Block and Inline
-
- You can change how a box is calculated by changing the `display` property
- The default style of block elements is `display: block`
- they appear on the page stacked atop each other, with each new element starting on a new line
- **Inline** elements *do not* start on a new line
- They appear in line with whatever elements they are placed beside
- the `<a>` tag is an example of an inline element, it doesn't disrupt the flow of the page, instead it integrates itself into the text
- Padding and margin behave differently with inline elements
- avoid using either of these properties for the most part
- Inline block elements behave like inline elements, but with block-style padding and margin
- Can be useful, but nowadays people use **flexbox** more often
#### Divs and Spans
- Block-level element, separates parts of the page for organization purposes.