Independent Articles and Advice
Login | Register
Finance | Life | Recreation | Technology | Travel | Shopping | Odds & Ends
Top Writers | Write For Us


PRINT |  FULL TEXT PAGES:  1 2 3 4 5 6
Framing Your Web Pages 
 
by Scott Nesbitt August 08, 2005

Linking Between Frames

If you want your visitors to click a link in one frame, and have the a page open in another frame, you must add the target= attribute to the link. The target= attribute points to the name of a frame defined using the name attribute.

In the page we built, we named the frames "menu" and "content". So, to open an item on the menu in the main frame, use a link like this:

<a href="basic_tags.htm" target="content">The Basic Frame Tags</A>

Linking to external Web pages and sites are a bit more tricky. It's annoying to click on a link to another site and have it open in your frameset. Especially if that site is framed itself. To avoid this, use the target="_top" attribute. The _top attribute breaks visitors out of your frames.

Inline Frames

You may want to stick a single frame on your Web page without dividing it into separate windows. You can can do with with an inline frame. An inline frame is a frame that sits as an independent portion of your document. The rest of your Web page flows around the frame, and isn't affected by it.

Add an inline frame to your page using the <iframe> tag. The same general rules that apply to using frames apply to using inline frames. You must specify the location of an HTML file that contains the content of the inline frame, and the height, width, and alignment of the frame.

Here is the basic code for an inline frame:

<iframe src="mypage.htm" height="150" width="150" align="right">

   Some content for non-frames browsers

</iframe>

Inline frames are great for including content that frequently changes, like news flashes, a daily picture, or a daily review of a Web site or piece of software. By using an inline frame, you don't need to continually re-code your Web page. You only need to update the frame's source file. You can also add links to the inline frame. Unless you add the attribute target="_top" to the link, any page you link to will appear in the inline frame.

PREV PAGE 1 2 3 4 5 6 NEXT PAGE

 




Home  |  Write For Us  |  FAQ  |  Copyright Policy  |  Disclaimer  |  Link to Us  |  About  |  Contact

© 2005 GoogoBits.com. All Rights Reserved.