CSS Dimension
CSS Dimension : Its property allow to you control the height and width of the element. There are a number of CSS Dimension properties:
Property | Description | Values |
height | Set the height of an element | auto, length,%, inhert |
max-height | Set the maximum height of an element | none, length,%, inhert |
max-width | Set the maximum width of an element | none, length,%, inhert |
min-height | Set the minumum height of an element | length,%, inhert |
min-width | Set the minumum width of an element | length,%, inhert |
width | Set the width of an element | auto, length,%, inhert |
Example
header {
max-width: 300px;
height: 100px;
background-color: red;
}
- auto The browser calculate the height and the width by default.
- length Defines the height and the width by px, inch, cm,....
- % Defines the height and the width by percentage.
- inhert Set the height and the width will be inherited its parent value.
Leave a comment
No Cmomments yet