hasLayout Property

This example uses the hasLayout property of the currentStyle object to show that an element has layout when it is absolutely positioned, or when its height and/or width are specified. The hasLayout property returns true for an object that has layout, and false for an object that has no layout.

hasLayout Property

Which DIV element has layout?

DIV element A has its width set to 100%.
DIV element B is not positioned, and neither its height nor width is set.