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
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
| 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
No scrollbar/Resizing
You can change the width and height as well as the frameborder.
Colorful Iframe border
Targetting inline frames
The Code for the Link:
The Code for the Frame:
Targetting Links
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
Defines the left and right margins for the frame; must be equal to or greater than 1
Defines the top and bottom margins for the frame; must be equal to or greater than 1
Frame Scrolling
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
Prevents the user from resizing a frame
No Frames
Defines what will appear on browsers that don’t support frames
