Here is an important point: Let's suppose that you make a frame 100 pixels wide on the left, and 100 pixels wide on the right. Since you are running an 800x600 screen you make the 3rd and middle area 600 pixels wide. Everything looks just dandy... to you. My screen is set at 640x480. Those 100 pixel wide frames you put in your page are now 80 pixels wide on my screen. If you use any absolute dimensions in your `<FRAMESET>` tags ALWAYS have at least one * as an elastic frame. That way everything will look good to everyone and there will be peace across the land once again.

This is the cause of a common problem with frames that I want to take the time to draw extra attention to. A popular frame layout is a narrow directory window on the left and a larger main window on the right like so. Here's the problem... If you divide up the windows using percentages (such as `<FRAMESET COLS="15%,85%">`) everything will probably look just dandy to you. But... to someone with a different screen resolution it might look like this.

The reason this happens is because you have specified that the left window should be 15%. 15% of what? 15% of whatever their horizontal screen resolution is. That means that that left window might look a little different to different people. How to fix you say? Glad you asked... Just use an absolute dimension for the left window and make the right window elastic (such as `<FRAMESET COLS="120,*">`). Bingo. Problem solved.

It's good idea to make that absolute dimension just a wee bigger than it needs to be. Give the stuff in that left window a little breathing room. For example, if 100 pixels gives a good but snug fit... make the window 120 or 125 pixels.

A good and painless way to check your layout at a couple different screen resolutions is with a nifty little MS PowerToy called Quickres.

We can have more than one leftover frame and specify a size relationship between them.

    <FRAMESET COLS="50,*,2*">
      <FRAME SRC="lisa.html">
      <FRAME SRC="terri.html">
      <FRAME SRC="kim.html">
    </FRAMESET>

VIEW IT

Translated this says: Make 3 frames. Make the first 50 pixels wide. The rest divide between frames 2 and 3 but make frame 3 twice as big as frame 2. Put Lisa in the first frame, Terri in the second and Kim in the third.

It is important to note that everything is done in order. The first `<FRAME>` is displayed according to the first size attribute in the `<FRAMESET>` tag (`50/lisa`) and the second with the second (`*/terri`) and the third with the third (`2*/kim`). I know that this may be mind-numbingly obvious, but it is very important and I wanted to draw extra attention to it.

What if we want to divide kim in half horizontally? Remember that I said that if you want to do any dividing you must use the `<FRAMESET>` tag. First we must replace Kim with a `<FRAMESET>` tag pair.

    <FRAMESET COLS="50,*,2*">
      <FRAME SRC="lisa.html">
      <FRAME SRC="terri.html">
      <FRAMESET>
      </FRAMESET>
    </FRAMESET>

At this point we have told the browser: Make 3 frames. Make the first 50 pixels wide. The rest divide between frames 2 and 3 but make frame 3 twice as big as frame 2. Put Lisa in the first frame, Terri in the second and the third frame we are going to divide further. Now we have to specify how to divide up that third frame.

We were going to divide it in half horizontally.

    <FRAMESET COLS="50,*,2*">
      <FRAME SRC="lisa.html">
      <FRAME SRC="terri.html">
      <FRAMESET ROWS="50%,50%">
      </FRAMESET>
    </FRAMESET>

And I think we'll put Kim back in on the top and Tina on the bottom. And that's that.

    <FRAMESET COLS="50,*,2*">
      <FRAME SRC="lisa.html">
      <FRAME SRC="terri.html">
      <FRAMESET ROWS="50%,50%">
        <FRAME SRC="kim.html">
        <FRAME SRC="tina.html">
      </FRAMESET>
    </FRAMESET>

VIEW IT

<< BACK NEXT >>