Start networking and exchanging professional insights

Register now or log in to join your professional community.

Follow

What are the different CSS properties used to change dimensions and what values can they accept?

user-image
Question added by Anirban Chakraborty , Network Administrator , Wipro Limited
Date Posted: 2016/12/02
Jonathan de Flaugergues
by Jonathan de Flaugergues , software engineer , Abbeal

The properties to change dimensions are height and width to respectly change to height and the width of a box.

 

Values accepted are  :

  - a length in px, cm, etc...

  - a percentage to define the width in percent of the containing block

  - the keyword 'auto' which is the default value => Width calculated by the browser

  - initial : To set the width to it default value

  - inherit : To inherit it value from it parent element.

 

You can also use the following properties :

  - line-height : to set the height of a line of text

  - max-height & min-height to set a max/min height that a box can be

  - max-width & min-width to set a max/min width that a box can be.

alaa liswe
by alaa liswe , ِAdministrative Assistant , Arab Open University

  • px (such as font-size: 12px) is the unit for pixels.
  • em (such as font-size: 2em) is the unit for the calculated size of a font. So “2em”, for example, is two times the current font size.
  • pt (such as font-size: 12pt) is the unit for points, for measurements typically in printed media.
  • % (such as width: 80%) is the unit for… wait for it… percentages.

Deleted user
by Deleted user

I think you are looking for this.

More Questions Like This

Do you need help in adding the right keywords to your CV? Let our CV writing experts help you.