This page is Almost Ready

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

hasLayout

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

Syntax

var result = declaration.hasLayout;
declaration.hasLayout = value;

Return Value

Returns an object of type StringString

Examples

The following example shows how to use the hasLayout property to determine whether an object has layout.

<DIV ID="oWidthSet" STYLE="width:100%">
    DIV element A has its width set to 100%.</DIV>
<DIV ID="oNotSet">DIV element B is not positioned,
    and neither its height nor width is set.</DIV>
<P>Which DIV element has layout?</P>
<BUTTON onclick="alert(oWidthSet.currentStyle.hasLayout)">
    DIV Element A</BUTTON>
<BUTTON onclick="alert(oNotSet.currentStyle.hasLayout)">
    DIV Element B</BUTTON>

View live example

Notes

Remarks

The following table shows Cascading Style Sheets (CSS) properties and corresponding values that, if set, cause an element to have a layout. {

Syntax

hasLayout: VARIANT_FALSE | VARIANT_FALSE

Requirements

{

See also

Related articles

CSSOM

Related pages

Attributions