back

Width

This is used to set the width of an element.
It sets the width before the Border, Margin, or Padding.

Its options are:
(1) Auto, the browser will calculate the width; based on several factors, including the elements content.
(2) Length, allows you to set the width as a value like px or cm.
(3) Percentage, allows you to set the width as a percentage of its containing element.
(4) Inherit, the value will be inherited from its parent element.

Example