width property
Gets the width of the rectangle that surrounds the object content.
![]() |
Syntax
| JavaScript | |
|---|
Property values
Type: Floating-point
The width of the rectangle, in pixels.
Standards information
Remarks
The width of the rectangle can also be calculated by subtracting the value of the left property from the value of the right property.
See also
Show:
