CSS Height and Width
Example
This element has a width of 100%.
Setting height and width
The height and width properties are utilized to set the height and width of a component.
The height and width can be set to auto (this is default. Implies that the program computes the height and width), or be indicated long qualities, similar to px, cm, and so on., or in percent (%) of the containing square.
This element has a height of 200 pixels and a width of 50%
Example
div {
height: 200px;
width: 50%;
background-color: powderblue;}
height: 200px;
width: 50%;
background-color: powderblue;}
This element has a height of 100 pixels and a width of 500 pixels.
Example
div {
height: 100px;
width: 500px;
background-color: powderblue;}
height: 100px;
width: 500px;
background-color: powderblue;}
0 comments:
Post a Comment