Frames
Borders and Borderless Frames
Simple Examples |
No Frames |
Borders and Borderless Frames |
Nested Framesets |
Frame Margins |
Naming Frames & Targeting Links |
Frames Exercise
Here's a modification of our previous example that had
two columns, but now there is no visible border between
the frames: Example
4. Compare this example to our previous Example
2.
Not only does the display look slightly different in these
two examples, note what happens in Example 2 if you place
your cursor on the border between the two frames and drag.
You should be able to move the border and adjust the relative
sizes of the two frames. Now try dragging on the line between
the two frames in Example 4. What happens?
The HTML for Example 4 is:
<frameset cols="20%,80%"
border="0">
<frame src="file1.html">
<frame src="file2.html">
</frameset>
|
We've simply taken the frame set of Example 2 and added
the attribute border="0" inside
the frameset tag. We can, of course, similarly modify our
very first frameset above:
<frameset rows="20%,80%"
border="0">
<frame src="file1.html">
<frame src="file2.html">
</frameset>
|
This creates a borderless frames version of Example 1:
Example
1b.
We can also explicitly set the border thickness to a nonzero
value if we want a visible border that is thicker or thinner
than what we get by default. Here's an example of using
BORDER="15": Example
1c. And if we wish, we can color a visible border: Example
1d. This latter example is accomplished with:
<frameset rows="20%,80%"
border="15" bordercolor="#000000">
<frame src="file1.html">
<frame src="file2.html">
</frameset>
|
We can keep a visible border between frames but disable
the draggability of the border (so the border cannot be
moved to change the relative sizes of the separated frames).
To do this we only need to add the NORESIZE attribute to
one or both of the frames separated by the border, e.g.,
Example
4a.
|