Framesets support columns and rows. In this section, you'll add columns to your frameset. You begin by setting up the two-column frame page.
The cols attribute for the frameset element gives you three value options:
Numeric value in pixels, such as cols="200". This results in a 200-pixel column.
Percentage value, such as cols="75%". A percentage value results in the column being 75% of the available browser space.
Dynamic value, represented by an asterisk, as in cols="*". This means that the column will dynamically resize to the available browser space.
Example 6-4 shows a frameset document used to create the two-column look we're after.
You'll note that I've also added frame elements.
To create a frame page, you need to have each column (or row, as you'll see in the next section) filled with a corresponding conventional HTML page. For these examples, I've created two very simple pages just for demonstration purposes, available for your use. You would, of course, add real content to these pages.
<!DOCTYPEl PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/l1/DTD/l1-frameset.dtd"> <l xmlns="http://www.w3.org/1999/l"> <head> <title>Frameset Document</title> </head> <frameset cols="200, *"> <frame src=" /> <frame src=" /> </frameset> <l>
This results in the left, light-gray column being fixed at 200 pixels and the right, dark-gray column being dynamic (see Figure 6-2).
Of course, you can have multiple columnsas many as you want. Just add more comma-separated values (and more frame elements to correspond). What's more, nothing says you can't mix and match the column values. Consider Example 6-5, which provides four total columns (see Figure 6-3).
<frameset cols="25%, *, 100, 25%"> <frame src=" /> <frame src=" /> <frame src=" /> <frame src=" /> </frameset>