This is an ad.
 
Webmonkey Kids
Webmonkey Kids
Lessons
Projects
Playground
Tools

Introduction
icon Frames Are a Picnic
Building the Frameset
More Chicken!
Adding the Frames
Sizing the Frames
Hanging the Frame



Parents and Teachers:
Find out how your kids can use Webmonkey for Kids as a learning tool at home or in the classroom with our Planning Guide.

Send us feedback

Lesson B: Frames
Sizing the Frames


ere's where it gets fun. We're up to the second (or right-hand) frame, which will actually be divided into two frames that sit on top of each other (pastasalad.html and jellocubes.html). To do this, we need to create a second frameset and "nest" it inside the first.

The second frameset will tell how the right-hand frame should be divided. We can do this in two ways: We could divide it by percentage as we did with the first frameset or by picking the number of pixels. What the heck: Let's do it by pixels.

You never want to define the size for all the frames in a frameset, because the total number of available pixels varies with the size of a person's computer screen. Instead, you'll want to make one of the frames a fixed size and leave the other frame undefined (indicated by *) so it can fill the remaining space on the user's screen.

In our case, we'll give the pasta salad about, oh, 2 inches, or 100 pixels (which, to be perfectly blunt, is more than enough for my mother's pasta salad) and donate the rest of the space to Jell-O cubes.

We'll do this by writing:

<frameset rows="100,*">

The browser knows that 100 is in pixels and not percentages because there's no % sign. So the top frame will be 100 pixels high, and the bottom frame - marked off with an * - will be different sizes, depending on the size of the viewer's computer screen.

Back

Next Page