Frame Function and Appearance

By default, your frames will be separated by borders with 3D beveled edges and each frame will be given a scrollbar if its contents do not fit in their entirety. This section looks at the attributes that give you greater control over the display and function of frames.

Frame Borders and Spacing

Borders can be manipulated using attributes within the <frameset> tag. Unfortunately, as of this writing borders are handled inconsistently between browsers, which makes specifying borders frustrating and sometimes unpredictable.

According to the documentation, you should be able to apply frame border attributes within the <frame> tags to adjust the borders for individual frames. Although frame settings should override frameset-level border settings, I have yet to see this handled successfully in any browser.

Borders for Netscape

For Netscape, use the frameborder attribute to turn borders off (no) or on (yes). You can set the color of the borders using the bordercolor attribute with an RGB or standard color name. The border attribute sets the thickness of the borders (in pixels) when the frameborder attribute is turned on, so you can set the borders as thick as you like. To turn the borders off entirely, set the frameborder=no and border=0.

Borders for Internet Explorer

Internet Explorer also uses the frameborder attribute to turn borders off and on, however, it supports the values 0 and 1, respectively (these are the values documented in the HTML 4.0 Specification). ...

Get Web Design in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.