This page is In Progress

Notice: The WebPlatform project, supported by various stewards between 2012 and 2015, has been discontinued. This site is now available on github.

width

Summary

Sets the width of an element.

Property of css/cssom/CSSStyleDeclaration/CSSStyleDeclarationcss/cssom/CSSStyleDeclaration/CSSStyleDeclaration

Syntax

var result = declaration.width;
declaration.width = value;

Return Value

Returns an object of type StringString

Notes

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.

Standards information

Attributions