Professional Documents
Culture Documents
Frames
Dividing a page, called frameset, into frames, allow the visitor to see more than one page at a time Each frame contains its own Web page, and theoretically could be viewed independently in a separate window One of the disadvantage they can be hard to navigate
how many panes your windows will have how its border look like should have scroll bars or not
<!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> <head> <meta http-equiv=content-type content=text/html;charset=utf-8 /> <title> FRAMES IN ROWS </title> </head> <frameset rows=20%,60%,20%"> <frame name="one" src="Winter.htm"/> <frame name="two" src="Sunset.htm"/> <frame name="three" src="Water lilies.htm"/> </frameset> </html>
Create simple frameset with 3 horizontal rows all in the same column
no <body> </body> rows=20%,60%,* 3 rows row height name identify the particular frames use
<!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> <head> <meta http-equiv=content-type content=text/html;charset=utf-8 /> <title> FRAMES IN COLUMNS </title> </head> <frameset cols="20%,*,20%"> <frame name="one" src="Winter.htm/> <frame name="two" src="Sunset.htm/> <frame name="three" src="Water lilies.htm/> </frameset> </html>
<!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> <head> <meta http-equiv=content-type content=text/html;charset=utf-8 /> <title> FRAMES IN COLUMNS </title> </head> <frameset frameborder="0" rows="20%,*,20%" cols="50%,*"> <frame name="one" src="red.htm" scrolling="no"/> <frame name="two" src="blue.htm" scrolling="no"/> <frame name="three" src="black.htm" scrolling="no"/> <frame name="four" src="purple.htm" scrolling="no"/> <frame name="five" src="green.htm" scrolling="no"/> <frame name="six" src="yellow.htm" scrolling="no"/> </frameset>
</html>
Combining Framesets
<!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> <head> <meta http-equiv=content-type content=text/html;charset=utf-8 /> <title> COMBINING FRAMESETS </title> </head> <frameset rows="10%,85%,*"> <frame name="one" src="blue.htm"/> <frameset cols="10%,*"> <frame name="two" src="yellow.htm"/> <frame name="three" src="purple.htm"/> </frameset> <frame name="four" src="red.htm"/> </frameset> </html>
<!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> <head> <meta http-equiv=content-type content=text/html;charset=utf-8 /> <title> INLINE FRAME </title> </head>
<body bgcolor="#ffffff">
<h1> COLOURS </h1> - colors - colors - colors - colors - colors - colors - colors - colors - colors - colors <hr /> <iframe src="combiningframesets.htm" width="100%" height="450"> <h1> this part :: type the text that should appear if the browser can't display the frame </h1> </iframe>
</body>
</html>
<!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> <head> <meta http-equiv=content-type content=text/html;charset=utf-8 /> <title> COMBINING FRAMESETS </title> </head> <frameset rows="10%,85%,*"> <frame name="one" src="blue.htm"/> <frameset cols="10%,*"> <frame name="two" src="yellow.htm"/> <frame name="three" src="purple.htm" marginheight="50" marginwidth="75"/> </frameset> <frame name="four" src="red.htm"/> </frameset> </html>
scrolling=yes scrolling=no
scrolling=auto
<title> COMBINING FRAMESETS </title> </head> <frameset rows="10%,85%,*" > <frame name="one" src="blue.htm"/> <frameset cols="10%,*"> <frame name="two" src="yellow.htm"/> <frame name="three" src="purple.htm" /> </frameset> <frame name="four" src="red.htm"/> </frameset> <title> YELLOW </title> </head> <body bgcolor="yellow"> <p> text - text - text - text - text - text - text - text - text - text </p> <a href="blue.htm" target="three">blue</a> <a href="green.htm" target="three">green</a> <a href="red.htm" target="three">red</a> <a href="purple.htm" target="three">purple</a> </body>
<a href=content.htm
to have the link open a new window to open the link in the same frame that contains
target=_parent
current frameset
to use the entire current window for the link to open the link in the frameset that contains the
<title> YELLOW </title> </head> <body bgcolor="yellow"> <p> text - text - text - text - text - text - text - text - text - text </p> <a href="blue.htm" target="three">blue</a> <a href="green.htm" target="three">green</a> <a href="red.htm" target="three">red</a> <a href="purple.htm" target="three">purple</a> </body> <title> YELLOW </title>
<base target=three/>
</head> <body bgcolor="yellow"> <p> text - text - text - text - text - text - text - text - text - text </p>
<a href="blue.htm">blue</a>
<a href="green.htm">green</a> <a href="red.htm">red</a> <a href="purple.htm">purple</a>
</body>
Nesting Framesets
As if frames and framesets werent complicated enough, you can nest framesets inside of frames to achieve special effects Build the inner frame ==
<title> NESTING FRAMESETS </title> </head> <frameset cols="*,3*"> <frame src="Winter.htm"/> <frame name="main" src="combiningframesets.htm"/> </frameset> </html>
combiningfra mesets.htm
Build the outer frameset ==
"Winter.htm"