mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-05-28 18:26:54 +00:00
fix(curriculum): improve default width behavior explanation (#63063)
This commit is contained in:
committed by
GitHub
parent
a04eeaa9f2
commit
2e26c997d7
+1
-1
@@ -11,7 +11,7 @@ In CSS, the `width` and `height` properties are used to control the dimensions o
|
||||
|
||||
These properties can be defined in different units such as pixels (`px`), percentages (`%`), viewport units (`vw`, `vh`), and more.
|
||||
|
||||
The `width` property specifies the width of an element. If you do not specify a width, then the default is set to `auto`. This means the element will take up the full width of its parent container.
|
||||
The `width` property specifies the width of an element. If you do not specify a width, then the default is set to `auto`. This lets the browser determine the element's width based on its content, parent, and display type. For a `div` element, `width: auto` makes it expand to fill the full width of its parent container.
|
||||
|
||||
The `height` property specifies the height of an element. Similarly, the height is `auto` by default, which means it will adjust to the content inside.
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ Here is an example of inline CSS:
|
||||
|
||||
## Working With the `width` and `height` Properties
|
||||
|
||||
- **`width` Property**: This property specifies the width of an element. If you do not specify a width, then the default is set to `auto`. This means the element will take up the full width of its parent container.
|
||||
- **`width` Property**: This property specifies the width of an element. If you do not specify a width, then the default is set to `auto`. This lets the browser determine the element's width based on its content, parent, and display type.
|
||||
- **`min-width` Property**: This property specifies the minimum width for an element.
|
||||
- **`max-width` Property**: This property specifies the maximum width for an element.
|
||||
- **`height` Property**: This property specifies the height of an element. Similarly, the height is `auto` by default, which means it will adjust to the content inside.
|
||||
|
||||
@@ -24,7 +24,7 @@ Review the concepts below to prepare for the upcoming exam.
|
||||
|
||||
## Working With the `width` and `height` Properties
|
||||
|
||||
- **`width` Property**: This property specifies the width of an element. If you do not specify a width, then the default is set to `auto`. This means the element will take up the full width of its parent container.
|
||||
- **`width` Property**: This property specifies the width of an element. If you do not specify a width, then the default is set to `auto`. This lets the browser determine the element's width based on its content, parent, and display type.
|
||||
- **`min-width` Property**: This property specifies the minimum width for an element.
|
||||
- **`max-width` Property**: This property specifies the maximum width for an element.
|
||||
- **`height` Property**: This property specifies the height of an element. Similarly, the height is `auto` by default, which means it will adjust to the content inside.
|
||||
|
||||
Reference in New Issue
Block a user