ابدأ بالتواصل مع الأشخاص وتبادل معارفك المهنية

أنشئ حسابًا أو سجّل الدخول للانضمام إلى مجتمعك المهني.

متابعة

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

user-image
تم إضافة السؤال من قبل Anirban Chakraborty , Network Administrator , Wipro Limited
تاريخ النشر: 2016/12/02
Jonathan de Flaugergues
من قبل 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
من قبل 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.

مستخدم محذوف‎
من قبل مستخدم محذوف‎

I think you are looking for this.

المزيد من الأسئلة المماثلة