Width and Height in CSS
Width and Height
CSS width and height properties allow users to change or customize the width and height of the given element.
Properties Included Are:-
- width
- height
- min-width
- min-height
- max-width
- max-height
For your Information:-
min-width, max-width, min-height, and max-height are the properties used with media screens to make the website responsive.
Syntax:-
Its syntax is:-
< style >
element {
width: auto| value| initial| inherit;
height: auto| length| initial| inherit;
}
< /style >
Further Explanation:-
Value | Description |
---|---|
auto | The browser calculates the height and width. |
length | Defines the width and height in px, cm, etc. |
% | Defines the width and height in percent of the containing block |
initial | Sets this property to its default value. |
inherit | Inherits this property from its parent element. |