Frames - part 4



. . . . . . <frame src="menu.htm" noresize>
You can also change the width of the margin inside the frame in which no page content will appear. The "marginheight" attribute specifies the top margin and the "marginwidth" attribute specifies the left-hand margin (this is similar to the topmargin and leftmargin attributes of the <body> tag).
. . . . . . <frame src="menu.htm" noresize marginwidth="3" marginheight="5">
You can set a border color for individual frames as well. This color takes precedence over a color that may have been set in the "frameset" tag.
. . . . . . <frame src="menu.htm" noresize marginwidth="3" marginheight="5" bordercolor="red">
Finally scrollbars in frames can be really ugly, especially when they land themselves right in the middle of the page. The scrollbar is on the right hand side of the frame, so if a frame is on the left of another frame then its scrollbar will be situated in the middle of the browser window. To overcome the problem of unwanted scrollbars you can use the "scrolling" attribute. If this is set to "yes" then there will always be a scrollbar. If this is set to "no" then there will never be a scrollbar. If this is set to "auto" then there will be a scrollbar if the page content takes up more space than is allocated to the frame. Some more modern browsers ignore this attribute.
. . . . . . <frame src="menu.htm" noresize marginwidth="3" marginheight="5" bordercolor="red" scrolling="no">

Hopefully next month I will be able to tie up the remaining few loose ends. However there may be a need for another article about frames after that. We will see next month.

Thanks for learning
Please take the time to rate this article below
Oisin Prendiville

The copyright of the article Frames - part 4 in HTML Lessons is owned by Oisin Prendiville. Permission to republish Frames - part 4 in print or online must be granted by the author in writing.

Go To Page: 1 2

Articles in this Topic    Discussions in this Topic