You might want to be more creative with your frame layout. You can use the <frameset> tag more than once in a single frameset document. This feature enables you to nest frames within each other. Following is an example of a nested frame. I indented the second <frameset> to make it easier to read. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>First Frameset</title> <style type="text/css"> </style> </head> <frameset rows="15%,*,10%"> <frame src="/books/1/174/1/html/2/sitename.htm" name="top" /> <frameset cols="20%,*,11%"> <frame src="/books/1/174/1/html/2/toc.htm" name="left" /> <frame src="/books/1/174/1/html/2/latin.htm" name="main" /> <frame src="/books/1/174/1/html/2/motto.htm" name="right" /> </frameset> <frame src="/books/1/174/1/html/2/contacts.htm" name="bottom" /> <noframes> <body> <p><a href="toc.htm">Table of Contents</a></p> </body> </noframes> </frameset> </html> The first <frameset> tag defines three horizontal frames, but the second <frameset> tag divides the middle row into three column frames. Figure 10.4 shows you how this nested frameset will appear in the browser. Figure 10.4. All the borders have been left showing to help you see where the nested frames are in this example.<iframe>You can create a frame one more way by using the <iframe>, or inline frame, tag. Rather than creating a separate frameset document, you define an inline frame within a regular HTML document because it appears in the middle of another document. Figure 10.5 shows the same content as the sample in Figure 10.4, but this page was created using an inline frame. You can see the HTML document for this page in Figure 10.6. Figure 10.5. The scrollable document in the center of this page was added with an inline frame.Figure 10.6. Style sheet properties are used to help define the colors and fonts for this document. The <iframe> tag is actually embedded inside a table to achieve the page layout shown in Figure 10.5.You can apply all the same attributes for regular frames to the <iframe> tag except the noresize attribute because unlike regular frames, inline frames cannot be resized. Caution
Tip
|