bestwebdesign

Freelancign web design and Graphics design

Friday 17 August 2018

CSS Height and Width

CSS Height and Width



Example

This element has a width of 100%.
Yourself Try

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;
}
Yourself Try
This element has a height of 100 pixels and a width of 500 pixels.

Example

div {
    height: 100px;
    width: 500px;
    background-color: powderblue;
}
Yourself Try













Wright © bestwebdesign and Graphics design


Share:

0 comments:

Post a Comment


Web Design Tutorial

Theme Support

Munere veritus fierent cu sed, congue altera mea te, ex clita eripuit evertitur duo. Legendos tractatos honestatis ad mel. Legendos tractatos honestatis ad mel. , click here →