Webmaster in a Nutshell

Previous Chapter 4
Frames
Next
 

4.5 Frame Border Attributes

With the version 3.0 release of their browsers, Internet Explorer and Netscape Navigator have added new tags to adjust the style of the borders that surround frames. Although they have the same functions, the attributes are slightly different for each browser.

Netscape uses the frameborder attribute to toggle between 3-D borders and simple rules for borders. The default is to use 3-D borders; a value of no gives simple borders. This attribute can be placed in either the <frameset> tag or in a <frame> tag. A setting in an individual <frame> overrides an outer <frameset> setting.

You can also set the color of the borders in both <frameset> and <frame> with the bordercolor attribute.

In the <frameset> tag, you can set the width of the borders in a whole frameset with the border attribute. The default width is 5 pixels. To achieve borderless frames in Netscape, set border=0 and frameborder=no.

Internet Explorer does all the same things, only with different attributes. It also uses frameborder in the <frameset> and <frame> tags, but the values are 1 for 3-D borders and 0 for simple ones. In the <frameset> tag, you can set the amount of space between frames with the framespacing attribute. By setting framespacing=0 and frameborder=0, you can achieve borderless frames.

Another new feature in Internet Explorer 3.0 is the floating frame. This has all the abilities that a regular frame does, but it is placed within a document like an <img> would be. The tag for a floating frame is <iframe>, and it requires a closing tag. The attributes include all of the regular <frame> attributes, and the sizing, alignment, and placement attributes of <img>.


Previous Home Next
Frame Targets Book Index Tables

HTML: The Definitive Guide CGI Programming JavaScript: The Definitive Guide Programming Perl WebMaster in a Nutshell