Forum Moderators: open

Message Too Old, No Replies

Basic question on using frames

Setting the height of a frame

         

runner

11:59 pm on Dec 10, 2004 (gmt 0)

10+ Year Member



I can't figure out how to set the height of a frame. Some frames will need fixed heights such as the header and footer. How do you specify a fixed height?

rocknbil

1:43 am on Dec 11, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



<FRAMESET ROWS="60,*,60" BORDER="0" FRAMEBORDER="0">
<FRAME SRC="eek_im_trapped_in_60_pixels.html" NAME="navigation" MARGINHEIGHT="12" MARGINWIDTH="12" SCROLLING="no" noresize>
<FRAME SRC="ha_ha_i_get_the_rest_of_the_page.html" NAME="main">
<FRAME SRC="im_trapped_in_60_but_on_the_bottom.html" MARGINHEIGHT="12" MARGINWIDTH="12" NAME="bottom" SCROLLING="no" noresize>
</FRAMESET>

Turn away from the Dark Side, you don't really need frames. :D

runner

1:58 am on Dec 11, 2004 (gmt 0)

10+ Year Member



I figured it out... I needed fixed sized frames but even though I specified the size instead of a percentage, it still filled the screen.

What I did was to add a blank frame on the bottom and specified a size of * and I added a blank frame to the right side of the screen with a size of * and that fixed it.

I wish I didn't have to use frames but I want to do some things that are too difficult to engineer with my limited knowledge.

For instance, I have a calendar in the lower left corner of the screen. I want to be able to click on a date and have the events file come up in another area of the screen and jump to the named anchor for that date. I can't figure out any other way to do it.

Also, I want the user to be able to change the month on the calendar without the rest of the page changing.

I did this by setting a cookie with the current month. When the page is reloaded, an SSI include reads the cookie and spits out the correct calendar. This keeps the calendar consistent across pages.

I have some very rough ideas sketched out at <Sorry, no personal URLs. See TOS [webmasterworld.com]>

If I could figure out how to click on a calendar day and have the text document jump to the correct named anchor, I'd give up on the frames.

[edited by: tedster at 3:28 am (utc) on Dec. 11, 2004]

rocknbil

6:24 pm on Dec 13, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I'm not getting what you are saying there but if it worked it worked. The solution I showed you fixes the top and bottom at 60 pixels and the main frame expands to whatever's left.

I have a calendar in the lower left corner of the screen. I want to be able to click on a date and have the events file come up in another area of the screen and jump to the named anchor for that date.

Why wouldn't this work?

<a href="dec_25th.html#6AM">6AM</a>

Then in dec_25th.html . . .

<a name="6AM"></a>
6 AM: Get kids out of bed for Christmas

There are man ways to keep the original calendar on the page, Javascript, server side includes, dynamic output, but if frames works for you, it works.

runner

10:37 pm on Dec 13, 2004 (gmt 0)

10+ Year Member



rocknbil... What you showed me works to some extent. The problem is that I want the various content windows to remain the same size nomatter what size the browser window is.

Once you start resizing the browser window to where it's smaller than your content area, the frames dynamically resize to become smaller.

I guess frames won't work after all. I want the frames to remain the same no matter how big or small the browser window is.

There seems to be no way to make the frame sizes fixed. Thanks for your help. Back to the drawing board.

tedster

11:13 pm on Dec 13, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You're correct - a frameset will always fill the window. If you don't designate a fixed sie frame, the browser will do as it is programmed and resize some or all.

You can always include an extra frame or two around the edges of the frameset, filled only with background and using "*" for its dimension. Then if the window gets resized, the other frames should remain unaffected and your "edge" frames will take up the adjustment.

runner

11:37 pm on Dec 13, 2004 (gmt 0)

10+ Year Member



Hi tedster... you're correct, that's what I did earlier but the frames that contain the content still resized when I made the browser small enough.

I just got it to work using an iframe so I won't need to use frames after all. I just couldn't conceptulaize (sp?) how the iframe worked. rocknbil was correct in his post above. I just did what he said and set up an iframe and pointed the link target to the iframe name. Whew! I should be paying you guys.

I might still make a mockup of my site using frames just for fun. Just wish I could figure out how to "freeze" the size of some of the frames so that they never resized at all.