To create a page with two columns instead of two rows, simply use COLS instead of ROWS in the FRAMESET tag: <FRAMESET COLS="20%, *"> |
If you want to be able to click a link and have a new page fill the window (replacing the frameset), use TARGET="_top" as follows: <A HREF="newpage.htm" TARGET="_top">Click here to see "newpage.htm" take up the whole window</A> And if you want the page to come up in an entirely new Internet Explorer window, use TARGET="_BLANK" as follows: <A HREF="newpage.htm" TARGET="_BLANK">Click here to see "newpage.htm" come up in a new window</A> Note: This works even on pages that do not have frames. To avoid cluttering the user's desktop with windows, this feature should be used sparingly. |
When using borderless frames, it's often helpful to be able to position a frame's contents directly at the top left corner of the frame, instead of a few pixels down and to the right, as is the default. To do this, change the individual frame page (in this case, row1.htm or row2.htm) so its BODY tag includes the following: <BODY TOPMARGIN=0 LEFTMARGIN=0> |
We could have created the same layout by using two FRAME tags and pointing the second FRAME tag to a separate file that was itself a frameset. The above syntax, in which we can insert a FRAMESET block instead of a FRAME tag, is actually a shorthand that reduces the number of files needed by one. There's one case in which you don't want to use the shorthand: when you want to click a link in frame 1 and have a page come up that replaces frames 2, 3, and 4. In that case, you would do it the longer way, giving the second frame a name and using <A HREF="address" TARGET="name of right-hand frame"> to replace the contents of that frame. |
Making Frameset Pages Visible in Browsers that Don't Support FramesSince frameset pages usually contain no content, just a set of FRAMESET and FRAME tags, they tend to not show up at all in browsers that don't support frames. Fortunately, the frames standard provides an easy way to provide content for non-frame browsers.<HTML> <FRAMESET ROWS="20%, *"> <FRAME SRC="row1.htm"> <FRAME SRC="row2.htm"> </FRAMESET> <NOFRAMES> Welcome to my home page! Click below to see my vacation photos... etc. </NOFRAMES> </HTML> Internet Explorer and other browsers that support frames will ignore everything between <NOFRAMES> and </NOFRAMES>. Browsers that do not support frames will ignore the frames and display everything between the NOFRAMES tags. |
Placing a Colored or Textured Border Between FramesWith Internet Explorer 3.0 you can not only turn off the 3-D borders between frames (see Step 7 above), you can also specify that the borderless frames should be a particular distance apart. Because this allows the background of the frameset page to show through, if your frameset page has a background color or image the effect is that of a colored or textured border between the frames.<HTML> <BODY BACKGROUND="woodgrain.gif"> <FRAMESET ROWS="20%, *" FRAMEBORDER=0 FRAMESPACING=20> <FRAME SRC="row1.htm"> <FRAME SRC="row2.htm"> </FRAMESET> </BODY> </HTML> The code above places a 20-pixel border between the two rows of the frameset. Because the author has specified a background graphic (woodgrain.gif), there will now appear to be a 20-pixel-wide textured border between the frames. (To use a background color instead of a background image, use BODY BGCOLOR=color name or value.) |
Back to the HTML Authoring Features page
© 1996 Microsoft Corporation