|
Big Changes from the StartFrames require changes from the first line. The doctype declaration that begins your page for the frameset differs from that of other pages. You type: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN"> at the beginning with "Frameset" replacing the word "Transitional" that goes at the beginning of most pages. You only do this for the frameset page, not the actual pages that fill the frames. Your <head> has no <body> on this first page. Doesn't it feel eerie? Instead of creating a web page with a body, you create the <frameset>. The other pages that you create to fill this frameset will be regular web pages with a <body>. View>Source Code for the frameset at the beginning of this unit for a more detailed example of a frameset. The basic structure of the frameset page is: <DOCTYPE HTML PUBLIC "-//W3C/DTD HTML
4.0 FRAMESET//EN"> <!-- your doctype declaration
--> <frameset rows="a, b" cols="c,d"> <!-- the "a" and "b" are the height of the rows while "c" and "d" are the width of the columns. --> <frame src="[file.htm]" name="[fixed name of frame, not file]"> <!-- always have at least the source to tell what file goes inside the frame and a name so that you can target the frame. Here you can also add the other fancy attributes Dave Raggett lists on page 261. --> <frame src="[otherfile.htm]" name="[other name]"> <!-- add the frame source and name for each frame you have designed for your page. --> <noframes> |
Return to Unit 9 |
|
If this idea of a frameset seems too peculiar, see the explanation by Jill Atkinson, "Frames are a Picnic," at Webmonkey. |
|||
How to Define Width and HeightIf the textbook's explanation of how to share the space between frames seems confusing, Chuck Musciano has a good explanation of how to set up rows and columns at Web Review. You can select either a set pixel width or a percentage of the screen. For example, a column may be 300 pixels wide or 25% of the screen. The asterisk * represents "all the remaining space" on the screen. That means that by itself with no other values defined, * can mean 100%. Or you can say " *, 3* ", which would divide a space into 25% and 75%. You can mix and match pixels, percentages and proportions when defining width and height. Continue to Notes on "on target">> Other comment notes for this unit: |
Copyright by dwang, 1999. All rights reserved.