The width
property specifies the width of the content area of an element. The width of an element does not include padding, borders, or margins. Width can be defined in percent of the containing block, pixels, cm, etc.
Set the width of an <img>
element using a percent value.
img { width: 50%; }
Setting the width of a <p>
element to 300 pixels.
p { width: 300px; }
width: value;
width
property does not include padding, borders, or margins.For more information, see http://www.w3schools.com/cssref/pr_dim_width.asp
Found a bug in the documentation? Let us know at documentation@code.org