Help Desk
By Ernest Black, guest Webmaster
Frameset Image Alignment
Dear Help Desk,
I've created a Web site for our bike shop using frames. The problem is, there are
graphics in two different frames that are supposed to line up. They do so in IE 4.0
and later, but not in Netscape. What can I do
to remedy this problem?
Kurt
Dear Kurt,
The shortest, best answer: Don't use frames. Problems like this are commonplace to framesets, which also affect search-engine indexing, orphaned pages, and the like. Frames can often be avoided by using
nested tables instead. However, if you
must use frames, the usual culprit in frame spacing issues is the extra space Netscape includes by default in the margins of each page. You should compensate for this
when laying out the frameset
(see
Example 1).
This code sets up two framesets, one
nested within the other. The first sets up
two rows, while the second sets up three columns in the second row. The first two columns are precisely set with absolute widths of 100 and 400 pixels, and the third claims whatever percentage of the browser window remains (hence the asterisk). The key point is that this lets you specify precisely,
in pixels, how far from the left margin of the first column the third column should begin. (Note that the value for marginwidth and marginheight must be greater than 0, and because fractions aren't allowed, the smallest margin size is one pixel.)