Language References
Sets and retrieves the width of the object in the units specified by the CSS width attribute.
HTML |
N/A |
Script |
object.style.posWidth [ = fWidth ] |
fWidth |
Any valid floating-point number. |
The property is read/write with no default value.
Setting the posWidth property changes the value of the width but leaves the units designator for the property unchanged.
Unlike the width property, the posWidth property's value is a floating-point number, not a string.
For more information on how to access the dimension and location of objects on the page through the document object model, see Measuring Element Dimension and Location.
The following JScript® ( compatible with ECMA-262 language specification ) example increases the width of the first IMG object by 10 units.
document.all.tags ( "IMG" ).item ( 0 ).style.posWidth += 10;
pixelWidth