How to make Frame on bottom of page
Brennan
Status: Curious
Joined: 15 Aug 2005
Posts: 6
Reply Quote
how do i make this frames box always stay at the bottom of the page instead of the top? so i can put some more i frames above it?
:: Code ::
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<frameset cols="100%" rows="110,*" frameborder="0" border="0" framespacing="0">
<frame src="photos.html">
<frame src="UntitledFrame-20.htm"></frameset>
<noframes>
seo links to content
</noframes>

</body>
</html>
[mod edit, this is the code in question]
thanks
Brennan
Back to top
erikZ
Status: Contributor
Joined: 30 May 2004
Posts: 148
Reply Quote
Hi Brennan, welcome to the forums. This is pretty easy stuff to work with, this is the only change you'd make:

:: Code ::
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<frameset cols="100%" rows="*,110" frameborder="0" border="0" framespacing="0">
<frame src="photos.html">
<frame src="UntitledFrame-20.htm"></frameset>
<noframes>
seo links to content
</noframes>

</body>
</html>

The trick is in rows="*,110". The * means a wildcard, use all unassigned space in the browser window. The 110 is the height of the second frame. These are in order, from top to bottom.

Validating frames
If you're going to use a doctype, you should use one that is valid for the HTML in question, frames use different doctypes:
:: Code ::
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"
   "http://www.w3.org/TR/html4/frameset.dtd">

However, that doctype doesn't allow you to use frameborder or border in the HTML, so with frames it's generally best to use no doctype at all, just <html>
Back to top
Brennan
Status: Curious
Joined: 15 Aug 2005
Posts: 6
Reply Quote
ok, that code didnt work for some reason, its still doing the same thing, this is what I'm basing this off [new user link] i wanted the bottom scrollbox on my site to be exactly like that, thanks soooo much
Brennan
Back to top
erikZ
Status: Contributor
Joined: 30 May 2004
Posts: 148
Reply Quote
Sounds like you're not refreshing your browser, forced refresh, ctrl + F5.

If you set rows="*,110" then that's what the browser must display. It's not optional. If you are still seeing the top narrow and the bottom wide and have made this change your browser is showing you the cached version of the page. Most browsers have default cache settings that make development a pain, change them to 'new on every view' or whatever, or just use the F5 key to refresh the page.
Back to top
thanks
Brennan
Status: Curious
Joined: 15 Aug 2005
Posts: 6
Reply Quote
k i figured it out, thanks alot, but i have yet another question, i want one of the frames to be unscrollable, so no scrollbars, how do i achieve this with just entering code in the frame source?
Thanks Brennan
Back to top
jeffd
Status: Assistant
Joined: 04 Oct 2003
Posts: 594
Reply Quote
That's pretty easy, one more frame attribute:

:: Code ::
<frame name="bottom" scrolling="no" src="bottom.html">

However, turning off scrolling doesn't work reliably cross browser, the scroll bar will generally vanish, but the stuff itself will still scroll. The only way to truly avoid that is by having scrolling="no" AND using absolute positioning of elements on the page, which will get around some of the pseudo non-scrollbar scrolling issues you will see in some browsers.
Back to top
perfect
Brennan
Status: Curious
Joined: 15 Aug 2005
Posts: 6
Reply Quote
thanks so much that worked, I have two more questions:
I have a iframe inside of a frame which results in slow loading. Is it possible to tell the site to load the background color first before anything inside that frame beacuase it shows up as white for a few seconds. Thanks so much
Brennan
Back to top
jeffd
Status: Assistant
Joined: 04 Oct 2003
Posts: 594
Reply Quote
No, there's pretty much nothing you can do about that. Keep in mind what frames and iframes are:

the primary web page, the one you reach through the url in your browser address bar, is what loads first. Since it's a framepage, you will see nothing until the frame content pages load, unless you assigned borders to the frames themselves.

So say you have 2 frames:
Main page loads. It requests the two content frame pages.
One of the two content pages has an iframe. The content page loads, then the iframe requests its content page.

You will never achieve good performace with this setup, it's why almost nobody uses it anymore.

I used to be a frame zealot, but finally I decided to pay attention to what my eyes told me re page performance, and I realized that in no case did a frame page perform better than the same content contained all in one html page.

Why is this?

It's because of the steps involved. Your frame content pages aren't even requested until the main frame page loads. The iframe page content isn't requested by the browser until the 3 other pages have loaded and been rendered by the browser, the frame container, the 2 content pages.

Since an iframe is not part of the document, but a window onto another document, there is pretty much nothing you can do to control things like that whitespace appearing. The white space appears because the frame content page includes the html for the iframe. The first thing it does is render itself, including the iframe window that will contain the last element of the overall page. The window itself can't be styled, although you can try giving the iframe a background color, but it won't work I think, since the whitespace you see is actually the space the browser is making for the page that is coming.

I just don't use these techniques anymore, almost all frame functionality can be somewhat duplicated using server side programming along with javascript, the pages always work better, faster, and more fluidly.
Back to top
Brennan
Status: Curious
Joined: 15 Aug 2005
Posts: 6
Reply Quote
ok thanks for that, I figured it out. Is there a code that tells the page it ant go smaller then a certain size? I want to prevent overlapping.
Thanks Brennan
Back to top
Display posts from previous:   

All times are GMT - 8 Hours