Frame Codes
Double frameset
|
Frames are a way to divide the browser screen to allow easier navigation under some circumstances. Frequently, frames are used to add a side menu bar to a web site where the constant back and forth clicking would become tedious in a single page. In this example, the side menu bar would allow the user to just click in the side menu bar, and their choice would load into the main window. In this example each frame has a full fledged html file loaded within it. <FRAMESET ROWS="100%" COLS="10%,*">
<FRAME NAME="Frame 1" SRC="menu_bar.htm" SCROLLING="AUTO" MARGINHEIGHT=1 MARGINWIDTH=1> <FRAME NAME="Frame 2" SRC="main.htm" SCROLLING="AUTO" MARGINHEIGHT=1 MARGINWIDTH=1> </FRAMESET> |
Triple frameset
|
<FRAMESET COLS="96,*,96" BORDERCOLOR="#ffffcc" BORDER="0" FRAMEBORDER="no" FRAMESPACING="no"> <FRAME NAME="left" SRC="left.htm" SCROLLING="none" MARGINHEIGHT="0" MARGINWIDTH="0"> <FRAME NAME="main" SRC="main.htm"> <FRAME NAME="right" SRC="right.htm" SCROLLING="none" MARGINHEIGHT="0" MARGIINWIDTH="0"> </frameset> |
It is common courtesy to place a <noframes> area after the frameset, but this is completely optional. This <noframes> area only displays in browsers that are not able to show frames:
<noframes> Your browser does not support frames. <a href="frameless_main.htm">Please visit the frameless page.</a> </noframes>
<noframes> Your browser does not support frames. <a href="frameless_main.htm">Please visit the frameless page.</a> </noframes>