Combining ROWS and COLSYou can only use ROWS or COLS in one frameset, not both. So if you need both rows and columns in your design, you'll need to "nest" your framesets -- kind of like nesting one table within another as we did in chapter six. The first step is to create the frameset tags for the outside frameset, the frameset that contains all the other framesets on your page. There's an easy rule of thumb to figure out which frameset this is, and what type of frameset to create first. Look at your storyboard drawing (you should always draw your design out on paper first) and see if any frames in your design extend either the entire width or the entire height of your window. If the answer is yes:
And if you can't decide, because no frame extends completely across the screen in either direction, start with a COLS frameset. This textbook is a good example of a nested frameset. Look at the design of this page. You'll see that it's a frameset page with a row across the top, and two columns below that. If you apply the rule of thumb above to this page design, we see that rule 1 applies -- there is a frame that extends left to right across the entire width of the window. So we need to start our page with a ROWS frameset.
Notice that the frameset has two frame values (70 and *) and so there are two frame tags, and two rows. The second frame in the frameset, the bottom frame, is the one that's going to contain two columns soon. So, for the time being, I've used a placeholder there -- an empty FRAME tag. Since that second frame is going to contain two columns, it actually needs to contain a COLS frameset. In fact, that second FRAME tag needs to be replaced with a COLS frameset. So we'll take the placeholder out and replace it with a COLS frameset, containing two columns.
Notice that this nested frameset has two frame values, 120 and *. So this frameset has two columns, a left hand column 120 pixels wide, and a right hand column that fills the rest of the window. This entire frameset fits within the second row of the outside frameset. Another exerciseGo ahead and try making a frame page. Try to make a page that looks like this structure: +-----------+--------------------------------------------------+ | | | | | | | | | | | | | | | | | | | +--------------------------------------------------+ | | | | | | | | | | | | | | | | | | | +--------------------------------------------------+ | | | | | | | | | | | | | | | | | | | +--------------------------------------------------+ | | | | | | | | | | | | +-----------+--------------------------------------------------+ |