From cb592ef81938fb4d77ea5099189aab1202be6142 Mon Sep 17 00:00:00 2001 From: ImAlpha Date: Tue, 25 Apr 2023 02:34:08 -0700 Subject: [PATCH] divs update --- Markdown/TheOdinProjectNotes.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/Markdown/TheOdinProjectNotes.md b/Markdown/TheOdinProjectNotes.md index ad73aca..6e0016a 100644 --- a/Markdown/TheOdinProjectNotes.md +++ b/Markdown/TheOdinProjectNotes.md @@ -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 -- \ No newline at end of file +- 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 `` 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. \ No newline at end of file