Discussion of Frames

(To go back to the main page, use this link.)


Benefit of the Frames Version

With the frames version of the table, it's a bit easier to arrange the page vertically as you'd like -- you can make sure the header and footer are always visible, the main body of the table takes up as much space as the browser makes available, and scrolling through the table does not make the hader and footer disappear from the screen.

Downsides of the Frames Version

Not every browser treats frames identically. If you view the table under both Safari 1.2 and Netscape 7.2, you'll see that the columns of the header and the columns of the body are not aligned identically in the new browser. The critical difference in this one case is what it means for a table's width to be "100%". In Safari, the "100%" width tables are all the same width. In Netscape, they're not -- the top and bottom frames do not have scroll bars, and the space that's saved is given to the contents of the frame. So the top frame is a smidgen wider, and the columns simply don't line up correctly.

This could be corrected by hard-coding a specific number of pixels in for the width, but that introduces its own problems. Tables that use a specific number of pixels for their width only look right when the browser width is one specific value. If the browser is any narrower, you have to scroll horizontally. If it's any wider, you end up with a large empty region in the browser window. Neither is really desirable.

It's basically impossible to get the frames version to print in any semblence of a reasonable manner. Most browsers generally only print one frame at a time, and no one frame contains enough data to make sense of the table.

It's more difficult to keep the visual appearance consistent between frames. Each frame gets to specify its own style sheet. If you forget to specify a style sheet in one frame, the styles will incorrectly not be applied in that one frame. If you are hard-coding the style sheet into the individual frames without using a refernece to an external style sheet, it's very, very easy for them to get out of sync.


back

Valid XHTML 1.0! Valid CSS!

Doug DeJulio
ddj+@cmu.edu