fix(curriculum): add missing margin & padding shorthand explanations (#60036)

This commit is contained in:
Vishal Shetty 2025-04-29 02:06:48 +05:30 committed by GitHub
parent ae6783decc
commit 678dc4334e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 2 deletions

View File

@ -127,8 +127,8 @@ ul ~ p {
- **`margin` Property**: This property is used to apply space outside the element, between the element's border and the surrounding elements.
- **`padding` Property**: This property is used to apply space inside the element, between the content and its border.
- **`margin` Shorthand**: The `margin` property can be set using the shorthand syntax, which allows you to set the margin for all four sides of an element at once. The values are applied in the order `top`, `right`, `bottom`, `left`.
- **`padding` Shorthand**: The `padding` property can also be set using the shorthand syntax, which allows you to set the padding for all four sides of an element at once. The values are applied in the order `top`, `right`, `bottom`, `left`.
- **`margin` Shorthand**: You can specify 14 values to set the margin sides. One value applies to all four sides; two values set `top` and `bottom`, then `right` and `left`; three values set `top`, horizontal (`right` and `left`), then `bottom`; four values set `top`, `right`, `bottom`, `left`.
- **`padding` Shorthand**: You can specify 14 values to set the padding sides. One value applies to all four sides; two values set `top` and `bottom`, then `right` and `left`; three values set `top`, horizontal (`right` and `left`), then `bottom`; four values set `top`, `right`, `bottom`, `left`.
## CSS Specificity

View File

@ -48,7 +48,9 @@ Review the concepts below to prepare for the upcoming exam.
## Margin and Padding
- **`margin` Property**: This property is used to apply space outside the element, between the element's border and the surrounding elements.
- **`margin` Shorthand**: You can specify 14 values to set the margin sides. One value applies to all four sides; two values set `top` and `bottom`, then `right` and `left`; three values set `top`, horizontal (`right` and `left`), then `bottom`; four values set `top`, `right`, `bottom`, `left`.
- **`padding` Property**: This property is used to apply space inside the element, between the content and its border.
- **`padding` Shorthand**: You can specify 14 values to set the padding sides. One value applies to all four sides; two values set `top` and `bottom`, then `right` and `left`; three values set `top`, horizontal (`right` and `left`), then `bottom`; four values set `top`, `right`, `bottom`, `left`.
## CSS Specificity