All TalkersCode Topics

Follow TalkersCode On Social Media

devloprr.com - A Social Media Network for developers Join Now ➔

CSS Dimensions

You can set height , max-height , min-height , width , max-width , min-width of every element in a webpage.


  • height:is used to set the height of an element the value can be auto,length,%,inherit.

  • max-height:is used to set the maximum height of an element the value can be none,length,%,inherit.

  • min-height:is used to set the minimum height of an element the value can be length,%,inherit.

  • width:is used to set the width of an element the value can be auto,length,%,inherit.

  • max-width:is used to set the maximum width of an element the value can be none,length,%,inherit.

  • min-width:is used to set the minimum width of an element the value can be length,%,inherit.

Example of Dimensions

div
{
height:200px;
}

div
{
max-height:600px;
}

div
{
min-height:200px;
}

div
{
width:400px;
}

div
{
max-width:700px;
}

div
{
min-width:400px;
}
❮ PrevNext ❯