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.

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.





[Right-click in window to view the full source code.]




© 2007 Microsoft Corporation. All rights reserved. Terms of use.