YUI recommends YUI3.
YUI 2 has been deprecated since 2011. This site acts as an archive for files and documentation.
This documentation is no longer maintained.
This example shows how to build a full page layout.
We can make a full page layout by omitting the first parameter to the Layout Manager's constructor.
Each area of the layout (top, right, bottom, left and center) is made up of a LayoutUnit
.
The only required unit is the center unit. It will be the one that is fluid when styled.
We can setup these units by passing them into the unit array configuration option.
Each LayoutUnit
has its own configuration settings. In the example below we, will show the following options:
position
: The position that this unit will take in the Layout.header
: The string to use for the Header of the unit.width
: The width (in pixels) that the unit will take up in the layout.resize
: Should the unit be resizable.gutter
: The gutter applied to the unit's wrapper, before the content.footer
: An id or string to use as the footer of the unit.collapse
: Should the unit be collapable. (places an icon in the header)scroll
: Should the unit's body have scroll bars if the body content is larger than the display area.body
: An id or string to be used as the unit's bodyanimate
: Should be animate the expand and collapse moments.See the API docs for more info on LayoutUnit options.
All YUI 2.x users should review the YUI 2.8.2 security bulletin, which discusses a vulnerability present in YUI 2.4.0-2.8.1.
Copyright © 2013 Yahoo! Inc. All rights reserved.