WWW

fine-tune frames
In addition to making frames borderless, there are numerous other ways to tweak your frames. Take a look at the following code:

<FRAMESET COLS="20%,60%,20%" FRAMESPACING="4">
<FRAME SRC="toolbar.html" MARGINWIDTH="10" MARGINHEIGHT="10" SCROLLING="no">
<FRAME SRC="index.html" MARGINWIDTH="10" MARGINHEIGHT="10" SCROLLING="auto">
<FRAME SRC="other.html" MARGINWIDTH="10" MARGINHEIGHT="10" SCROLLING="auto" NORESIZE>
</FRAMESET>
show me!

The FRAMESPACING attribute of the <FRAMESET> tag defines the space (in pixels) between frames, much like the CELLSPACING attribute of the <TABLE> tag.

The MARGINWIDTH and MARGINHEIGHT attributes of the <FRAME> tag define the space (in pixels) between the frame contents and the frame borders (much like the CELLPADDING attribute of the <TABLE> tag) to ensure that the pages inside a frame don't smack into the sides.

The SCROLLING attribute lets you decide whether a frame should have scrollbars: SCROLLING="yes" makes them appear all the time, SCROLLING="no" turns scrollbars off no matter what happens, and SCROLLING="auto" (the default) lets the browser decide based on the space it has for a frame and the size of the content within that frame. In the example above, the first frame will never show scrollbars, while the second and third frames will scroll only if their content is larger than the frames.

Normally, a user can click a frame's border and move it to resize the frame. The NORESIZE attribute does just what you'd expect: it prevents the frame from being resized. In the example above, the last frame has the NORESIZE attribute, which means that the border it shares with the second frame cannot move. The border between the first and second frames, however, can be moved.



Vogel Publishing s.r.o.