Targeting Frames with Links


Targeting Frames with Links

You probably surfed the Web for all of a minute and a half before you first realized that if you click on a link the current page goes away and a new page fills the window. That's a great systemexcept for framed sites. Often, when a link is clicked in one frame, the new file should open in some other frame entirely. You can make that happen by using a target attribute in the link. The target names the frame where the new file will open. Yep, that's why you named the frames.

To make a target link while working in the frameset:

1.
Open the frameset with the page where you want the link visible.

2.
Highlight the text for the link.

3.
The Property Inspector link options appear.

Browse for the file you want the link to open.

or

Click the Point-to-File icon and point to a file in the Files panel to create the link. Choose the target frame from the Target menu ( Figure 11.21 ). Dreamweaver already knows which frames are in the frameset.

Figure 11.21. When you create a link while working in the frameset document, Dreamweaver provides the Target options in the Property Inspector.


4.
Choose Save > Frame to save your changes.

To make a target link while working on an individual page:

1.
Open the page where the link will be.

2.
Highlight the text for the link.

3.
The Property Inspector link options appear.

Browse for the file you want the link to open.

or

Click the Point-to-File icon and point to a file in the Files panel to create the link. Type the frame name in the Target field ( Figure 11.22 ). Spelling and capitalization must be exactly right.

Figure 11.22. When you create a link in an individual document, you must manually type the target in the Target field of the Property Inspector.


4.
Save your changes.

Tip

  • While it's definitely handy to have the pop-up menu of frame targets right there in the Property Inspector when making links in the frameset document window, it's not without peril. Inadvertent improper saves can play havoc with the frameset. If you create the individual pages for the site independently, outside of the frameset document, you do have to do a bit of extra typing to get the Target field filled in. However, when you save an individual page, you can't possibly save anything besides the individual page.


Working with Frames and CSS

You won't use CSS to lay out a framed site, but what about for everything besides layout? CSS will work just fine with framed sites to control the various display properties of the individual pages.

In Chapter 5, "Styling Page Content," you learned how to attach a style sheet to a document. To use CSS with a framed site, you simply attach a style sheet to every individual page that will be inserted in your frameset.





Macromedia Dreamweaver 8 for Windows & Macintosh Visual QuickStart Guide
Macromedia Dreamweaver 8 for Windows & Macintosh
ISBN: 0321350278
EAN: 2147483647
Year: 2005
Pages: 239

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net