cssFloat property

Sets or retrieves a value that specifies whether a box should float to the left, right, or not at all.

Document Object Model (DOM) Level 2 Style Specification, Section 2.3Internet Explorer 9



HRESULT value = object.put_cssFloat( v);HRESULT value = object.get_cssFloat(* p);

Property values

Type: BSTR


Default. An object is displayed where it appears in the text.


Text flows to the right of the object.


Text flows to the left of the object.

Standards information


The IHTMLCSSStyleDeclaration::cssFloat attribute can be set for elements that generate boxes that are not absolutely positioned.

The IHTMLCSSStyleDeclaration::cssFloat attribute corresponds to the IHTMLCSSStyleDeclaration::styleFloat Cascading Style Sheets (CSS) property. Getting this attribute is equivalent to calling the IHTMLCSSStyleDeclaration::getPropertyValue method. Setting this attribute is equivalent to calling the IHTMLCSSStyleDeclaration::setProperty method.