Skip to content

Commit 678dc43

Browse files
fix(curriculum): add missing margin & padding shorthand explanations (freeCodeCamp#60036)
1 parent ae6783d commit 678dc43

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

curriculum/challenges/english/25-front-end-development/review-basic-css/671a887a7e62c75e9ab1ee4a.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,8 @@ ul ~ p {
127127

128128
- **`margin` Property**: This property is used to apply space outside the element, between the element's border and the surrounding elements.
129129
- **`padding` Property**: This property is used to apply space inside the element, between the content and its border.
130-
- **`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`.
131-
- **`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`.
130+
- **`margin` Shorthand**: You can specify 1–4 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`.
131+
- **`padding` Shorthand**: You can specify 1–4 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`.
132132

133133
## CSS Specificity
134134

curriculum/challenges/english/25-front-end-development/review-css/671a9a0a140c2b9d6a75629f.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,9 @@ Review the concepts below to prepare for the upcoming exam.
4848
## Margin and Padding
4949

5050
- **`margin` Property**: This property is used to apply space outside the element, between the element's border and the surrounding elements.
51+
- **`margin` Shorthand**: You can specify 1–4 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`.
5152
- **`padding` Property**: This property is used to apply space inside the element, between the content and its border.
53+
- **`padding` Shorthand**: You can specify 1–4 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`.
5254

5355
## CSS Specificity
5456

0 commit comments

Comments
 (0)