Nested framesets
You can use the frameset element to create more complex layouts in a framed Web site by nesting frameset areas as in Fig. 3.10.
The first level of frameset tags is on lines 21 and 22
frame name = "nav"src = "nav.html">
The frameset and frame elements here are constructed in the same manner as in Fig. 3.9. We have one frame that extends over the first 110 pixels starting at the left edge.
The second (nested) level of the frameset element covers only the remaining frame area that was not included in the primary frameset. Thus, any frames included in the second frameset will not include the left-most 110 pixels of the screen. Lines 2629 show the second level of frameset tags.
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"
2 "http://www.w3.org/TR/html4/frameset.dtd">
10 <meta name = "keywords" content = "Webpage, design, HTML,
11 tutorial, personal, help, index, form, contact, feedback,
12 list, links, frame, deitel">
14 <meta name = "description" content = "This Web site will help
15 you learn the basics of HTML and Webpage design through the
16 use of interactive examples and instruction.">
18 <title>XML How to Program - Main</title>
22 frame name = "nav" src = "nav.html">
24 <!-- Nested framesets are used to change the formatting -->
25 <!-- and spacing of the frameset as a whole -- >
27 frame name = "picture" src = "picture.html">
28 frame name = "main" src = "main.html">
29 </frameset>
31 <noframes>
32 <p>This page uses frames, but your browser does not support
35 <p>Please, <a href = "nav.html">follow this link to browse our
37 </noframes>
39 </frameset>
Fig. 3.10 Framed Web site with a nested frameset (part 1 of 2).
Fig. 3.10 Framed Web site with a nested frameset (part 2 of 2).
<frameset rows = frame name = frame name = </frameset>
"picture" src = "picture.html"> "main" src = "main.html">
In this frameset area, the first frame extends 175 pixels from the top of the screen, as indicated by the rows = "175,*". Be sure to include the correct number of frame elements inside the second frameset area. Also, be sure to include a noframes element and to close both of the frameset areas at the end of the Web page.
Post a comment