Frames in frames

The border between the frames is displayed by default and, as a rule, in the form of a three-dimensional line. To hide it, use the frameborder parameter of the <FRAMESET> tag with a value of no or 0 . However, in the Opera browser the border, although it becomes pale in this case, still remains. For this browser, you need to add the framespacing = "0" parameter . Thus, by combining different parameters of the <FRAMESET> tag , we get a universal code that works in all browsers. The line will not be shown at all (Example 1).

Example 1. The missing frame between frames

Invalid HTML
<! DOCTYPE HTML PUBLIC "- // W3C // DTD HTML 4.01 Frameset // EN" "http://www.w3.org/TR/html4/frameset.dtd">
<Html>
<Head>
<Meta http-equiv = "Content-Type" content = "text / html; charset = windows-1251">
<Title> Frames </ title>
</ Head>
<Frameset cols = "200, *" frameborder = "no" framespacing = "0" >
<Frame src = "menu.html" name = "MENU" noresize>
<Frame src = "content.html" name = "CONTENT">
</ Frameset>
</ Html>

If the border between the frames is still needed, in the browser it is drawn by default, without specifying any parameters. You can also set the border color using the bordercolor parameter , which can be used in the <FRAMESET> and <FRAME> tags . The color is indicated by its name or hexadecimal value (example 2). The Opera browser ignores this option and usually displays a black line.

Example 2. Changing the frame color

Invalid HTML
<! DOCTYPE HTML PUBLIC "- // W3C // DTD HTML 4.01 Frameset // EN" "http://www.w3.org/TR/html4/frameset.dtd">
<Html>
<Head>
<Meta http-equiv = "Content-Type" content = "text / html; charset = windows-1251">
<Title> Frames </ title>
</ Head>
<Frameset cols = "200, *" bordercolor = "navy" border = "5">
<Frame src = "menu.html" name = "MENU" noresize>
<Frame src = "content.html" name = "CONTENT">
</ Frameset>
</ Html>

In the example, the frame will be blue. The appearance of lines differs in different browsers, despite the same parameters (Figure 1).

Border in Internet Explorer 6 The border in the Opera 7 browser The border in the Netscape 7 browser
a. Internet Explorer 6 B. Opera 9 at. Firefox 2

Fig. 1. The type of border between frames in different browsers

The Opera browser (Figure 1b) does not change the border color between frames, Internet Explorer (Figure 1a) sets a wide border of almost solid color, and Firefox (Figure 1c), the border displays as a set of lines.

Copyright © www.htmlbook.ru