ScanSkill

width

The width property defines the width of an element. The width of an element does not include padding, borders, and margins.

Syntax

width: value | auto;

Example

.mydiv{
	width: 100px;
	border:1px solid red;
}
width

Property Values

value: sets the provided value as the width of an element.

auto: automatically sets the width to display the element’s content.