0 views

Frames join more than one page together. You put your actual content on separate pages that you want to link. And then you put the frame code on a third separate page. Also important to note is targetting the links. You pay attention to the target destination so as a URL opens in a certain frame.

Regular Frames

<FRAMESET COLS="15%,85%"> <FRAME SRC="MENU PAGE URL" name=Menu> <FRAME SRC="MAIN PAGE URL" name=Main> </FRAMESET>

Put this code on a 3rd, separate, blank page, that is not the main or menu one. The numbers beside frameset cols are the size of each frame. You can change them to change the size of each side frame. 15% is the menu page and 85% is the main page. It should add up to 100% Change the menu and main page url’s to those 2 pages, and the frame names can be changed to any one-word name. The name is important for targeting the links to the frames.

M
E
N
U
main.html page

Advanced Frames

<FRAMESET COLS="50%,50%"> <FRAMESET ROWS="100%"> <FRAME SRC="MAIN URL" name=BLAH> </FRAMESET> <FRAMESET ROWS="33%,33%,33%"> <FRAME SRC="URL HERE" name=BLAH2> <FRAME SRC="URL HERE" name=BLAH3> <FRAME SRC="URL HERE" name=BLAH4> </FRAMESET> </FRAMESET>

main
page
1.html
2.html
3.html

You can create column frames instead. Just replace ROWS with COLS. Experiment. Personally, I don’t like using frames. I read somewhere that professional web designers consider frames a big no-no. So I try not to use them.

Colorful Frame Borders

<FRAMESET COLS="65%,35%"> <FRAME SRC="URL HERE" style="border: # solid COLOR> <FRAME SRC="URL HERE"> </FRAMESET>

No scrollbar/Resizing

<FRAMESET ROWS="10%,90%"> <FRAME SRC="URL HERE" style="border: 2 solid blue noresize scrolling=no><xmp>


You can change the width and height as well as the frameborder.

Colorful Iframe border

<IFRAME width=# height=# name=BLAH style="border:# solid COLOR"> </IFRAME>

Targetting inline frames
The Code for the Link:

<a href="URL HERE" target=THEFRAME>TEXT HERE</a>

The Code for the Frame:

<iframe FRAMEBORDER="1" width=100 height=80 name=THEFRAME> </iframe>

Targetting Links

<a href="URL HERE" target="FRAMENAME">TEXT HERE</a>
Target so the page opens up in the frame you want.
Other possible targets:
_blank – loads the page into a new browser window.
_self – loads the page into the current window.
_parent – loads the page into the frame that is superior to the frame the hyperlink is in.
_top – cancels all frames, and loads in full browser window.

Frame Margins

<frame marginwidth=#>
Defines the left and right margins for the frame; must be equal to or greater than 1
<frame marginheight=#>
Defines the top and bottom margins for the frame; must be equal to or greater than 1

Frame Scrolling

<frame scrolling=VALUE>
Sets whether the frame has a scrollbar; value may equal “yes,” “no,” or “auto.” The default, as in ordinary documents, is auto.

No Resizing of Frames

<frame noresize>
Prevents the user from resizing a frame

No Frames

<noframes>What people who can&#8217;t view frames see</noframes>
Defines what will appear on browsers that don’t support frames