Sets or retrieves the width of the object in the units specified by the IHTMLStyle::width attribute.
HRESULT IHTMLStyle::get_posWidth(float *p);HRESULT IHTMLStyle::put_posWidth(float v);
- Pointer to a variable of type float that receives any valid floating-point number that uses the same length units as the IHTMLStyle::width attribute.
- float that specifies any valid floating-point number that uses the same length units as the IHTMLStyle::width attribute.
Returns S_OK if successful, or an error value otherwise.
This property reflects the value of the Cascading Style Sheets (CSS) IHTMLStyle::width attribute for positioned items. This property always returns zero for nonpositioned items because "width" has meaning only when the object is positioned. If the IHTMLStyle::width attribute is not set, the IHTMLStyle::posWidth property returns zero.
Setting the IHTMLStyle::posWidth property changes the value of the width but leaves the units designator for the property unchanged.
Unlike the IHTMLStyle::width property, the IHTMLStyle::posWidth property value is a floating-point number, not a string.
For more information about how to access the dimension and location of objects on the page through the Dynamic HTML (DHTML) Document Object Model (DOM), see Measuring Element Dimension and Location with CSSOM in Internet Explorer 9.