<html>
<head>
<title>HTML Frames - An Advanced Frame Layout</title>
</head>
<frameset rows="20%,80%">
<frame src="header.htm">
<frameset cols="25%,75%">
<frame src="menu_adv.htm" name="menu">
<frame src="chapter1.htm" name="content">
</frameset>
</frameset>
</html>
<frameset>...</frameset>
tags act as a container for everything else and use the rows="20%,80%"
attribute/value pair to split the page horizontally into two rows: a top row that spans 20% of the full height of the browser viewport and a bottom row that spans the remaining 80%.<frame>
tag uses the src="header.htm"
attribute/value pair to load the header.htm
file into the top row. It's unlikely that a hyperlink will target this frame to load a new page so the name
attribute is omitted.<frame>
tag that would normally be used to load a file into the bottom row is omitted and, in its place, we use an inner or nested set of <frameset>...</frameset>
tags. This nested frameset uses the cols="25%,75%"
attribute/value pair to split the bottom row into two columns: a left column that spans 25% of the full width of the browser viewport and a right column that spans the remaining 75%.<frame>
tags inside the nested frameset each use the src
attribute to load menu_adv.htm
and content1.htm
into the left and right columns respectively. The name attribute is used in each to permit hyperlinks to target the frame.<frame>
tag in a frameset document may be replaced by a new set of <frameset>...</frameset>
tags. This nested frameset then splits the frame it represents into more framed sections.
header.htm | (The frameset loads this document into the top row.) |
menu_adv.htm | (The frameset loads this document into the left column of the bottom row.) |
chapter1.htm | (The frameset loads this document into the right column of the bottom row.) |
<iframe>...</iframe>
tags.<iframe src="chapter1.htm" name="subwindow" width="400" height="200"></iframe>
<iframe>
start tag requires at least the src
attribute and can also use other attributes to enhance the inline frame's usability and appearance. These are outlined below:
src="file name"
~ Use the src
attribute to specify which HTML document is to be loaded into the inline frame. The value of the src
attribute can be just the file name (relative addressing) or a full-blown URL (absolute addressing).name="any name"
~ Use the name
attribute to act as a target for hyperlinks to use to load other documents into the inline frame. (See Creating Hyperlinks for Frames for more information.)width="percentage or pixels"
~ Using the width
attribute, you can explicitly set the width of your inline frame. You may define either a fixed width in pixels or a relative width which will size your inline frame according to a percentage of the available space (typically the entire width of your web page). Hence a width="400"
attribute/value pair will set the width of your inline frame to 400 pixels. A width="50%"
attribute/value pair will set the width to 50% of the available space.height="percentage or pixels"
~ Using the height
attribute, you can explicitly set the height of your inline frame. You may define either a fixed height in pixels or a relative height which will size your inline frame according to a percentage of the available space (typically the entire height of your web page). Hence a height="200"
attribute/value pair will set the height of your inline frame to 200 pixels. A height="50%"
attribute/value pair will set the height to 50% of the available space. (NOTE: It'll probably be easier to just use pixels to set the height.)
Free Text Editors
Free Graphics Editors
Website Analysis Tools
Free Website Templates
See also:
If you need a .COM web address, you can get one quick and easy at...
<~ BACK | TOP | NEXT ~> |