Definition The width property sets the width of an element. Inherited: No JavaScript Syntax CSS properties can also be dynamically chan...
Definition
The width property sets the width of an element.Inherited: No
JavaScript Syntax
CSS properties can also be dynamically changed with a JavaScript.Scripting Syntax: object.style.width="300px"
Example
img { width: 100% } |
Possible Values
Value | Description |
---|---|
auto | Default. The browser calculates the actual width |
% | Defines the width in % of the parent element's width |
length | Defines the width in px, cm, etc. |
Goto CSS3 and CSS2 complete reference