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.

YUI Library Examples: Grids CSS: Page Width = 950px

Grids CSS: Page Width = 950px

This example shows how to use YUI Grids CSS to create a layout with a 950px page width.

Setting Page Width with YUI Grids

YUI Grids CSS offers three ways to control your page layout. These examples show how to control the page width, one of the three types of control. You can use Grids to just set page width or combine this feature with Grids' Preset Templates and/or Nesting Grids.

YUI Grids sets the page width on a div that wraps the entire page. By setting the id of the div you can choose your page width. Here are the included options:

  • div#doc creates a 750px page width.
  • div#doc2 creates a 950px page width.
  • div#doc3 creates a 100% page width. (Note that the 100% page width also sets 10px of left and right margin so that content had a bit of breathing room between it and the browser chrome.)
  • div#doc4 creates a 974px page width, and is a new addition to Grids in YUI version 2.3.0.

This example showcases the div#doc2 950px page width.

Grids CSS Examples:

More Grids CSS Resources:

Copyright © 2013 Yahoo! Inc. All rights reserved.

Privacy Policy - Copyright Policy - Job Openings