Frames - part 4


© Oisin Prendiville

Welcome back. This is article number 15 in the series and article number 4 in the frames section. If you are only interested in the frames section you should make sure and read the first two articles before you read this one. If you are a complete beginner and want to learn about other aspects of html as well, then you should read the other 14 articles first. For a complete list of the articles about html go to http://www.suite101.com/articles.cfm/htm...

This month I will talk about the other attributes of the <frameset> & <frame> tags, which help you to make your pages look better. The fact of the matter is that the default appearance of frames is just plain ugly and I have never seen an attractive page, which uses frames with their default appearance. If you remember one thing from this article let it be: "DO NOT EVER USE FRAMES WITH DEFAULT APPEARANCE".

The best way to change the appearance of a frame is to remove the border altogether. I will also explain how to change the color and thickness of the border, how to remove scrollbars, and some other useful tips.

First of all imagine you have a frameset containing three columns:
. . . . . . <frameset cols="150,*,50">
You can set the thickness of the borders in that frameset by using the "border" attribute and setting it to a specific number of pixels, I would recommend setting it to '0' all the time to remove the borders.
. . . . . . <frameset cols="150,*,50" border="0">
The "frameborder" attribute can be set to "yes" or "no". If "no" is set then the borders will not have a 3D effect. Even if the border is set to '0' it is best to set this attribute anyway.
. . . . . . <frameset cols="150,*,50" border="0" frameborder="no">
Finally the "bordercolor" attribute can be used to change the color of the border. You can set the color using hexadecimal notation or one of the predefined colors, as discussed in an earlier article about Color. I will change the thickness of the border for this example.
. . . . . . <frameset cols="150,*,50" border="2" frameborder="0" bordercolor="white">

Attribute for single frames can be set in the <frame> tag for that particular frame. We will start with an ordinary frame reference:
. . . . . . <frame src="menu.htm">
It can sometimes ruin the design of pages when a visitor starts changing the width of frames, so to avoid this happening you can use the "noresize" attribute as follows.

Go To Page: 1 2


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

Post this Article to facebook Add this Article to del.icio.us! Digg this Article furl this Article Add this Article to Reddit Add this Article to Technorati Add this Article to Newsvine Add this Article to Windows Live Add this Article to Yahoo Add this Article to StumbleUpon Add this Article to BlinkLists Add this Article to Spurl Add this Article to Google Add this Article to Ask Add this Article to Squidoo