View Full Version : Help with Frames

07-11-2005, 10:38 PM
Hi everyone, I can safely say I know a little html and that's about it. I've been trying to build a site for myself for the last two weeks and am becoming very frustrated with two problems I cannot seem to solve.

in putting together the following frameset my goal is to have the three central frames static and fixed and allow the top and bottom frames to resize as necessary.

The first problem I have is the 2nd frame (header_frame) must be 20 px greater then the 70px high table contained within it or the 3rd frame overlaps it (regardless of screen real-estate) Note; for all pages I set the margin attributes to 0 and I don't have this problem with the other frames:

The second problem is if the browser window is not maximized or quite large enough, the central 3 frames overlap each other...??? is there a way of preventing this from happening?

Any ideas or suggestions you could offer would be very helpful - Thank you.

<frameset rows="*,90,400,70,*" cols="1" framespacing="0" frameborder="NO" border="0">
<frame src="top_blank_frame.htm" name="top_blank" frameborder="no" scrolling="no" marginwidth="0" marginheight="0" id="top_blank">
<frame src="header_frame.htm" name="topFrame" frameborder="no" scrolling="NO" noresize marginwidth="0" marginheight="0" id="header">
<frame src="body_frame.htm" name="mainFrame" frameborder="no" scrolling="NO" noresize marginwidth="0" marginheight="0" id="body">
<frame src="footer_frame.htm" name="bottomFrame" frameborder="no" scrolling="NO" noresize marginwidth="0" marginheight="0" id="footer">
<frame src="top_blank.htm" name="bottom_blank" frameborder="no" scrolling="no" marginwidth="0" marginheight="0" id="bottom_blank" >

07-12-2005, 12:54 PM
I would suggest that you don't have frames on your website as search engines hate them because they can't see your links or anything, if you are making a site for yourself/friends however, it doesn't matter

07-12-2005, 06:45 PM
I'm open to any suggestion that will work, but I don't know what other approach to use. The site is for me and it's a photography portfolio site. The idea is to have a menu on top, portfolio images and other info in the middle, and submenus and navigation on the bottom. I want to try and contain everything within 800px wide x 600px tall. The site where I got the idea for the layout is: http://www.santillophotography.com/pages/framesets/frameSetOuter.html

(His work is much racier then my work...). Anyway, the functionality of the site is similar to what I'm trying to do but I don't think I know the right approach to make it work correctly. I'd frankly like hire someone more qualified then myself to build it but I lost my job 6 weeks ago (which is why I need to build this site) and can't afford it. So if anybody is able to point me in the right direction it would really be helpful.

07-13-2005, 10:39 AM
Have you thought about a 'Floating page' layout, I have a template, which I will post later, as this isn't my computer. I will put a lot of comments in so you can understand what goes where, with a few tables you should get a good looking page layout. You can easily specify how big you want everything to be, and it will still look good on a bigger monitor.

07-13-2005, 02:10 PM
heres an messy example of what I "think" you might be going for. It has a fixed top bar for the navigation. It uses a javascript to load the 2 sub frames onClick of the link. It's centered and small enough to fit in a 800x600 resolution without causing scrollbars. I just plugged in html pages that I had in the same folder to try it out so you'll deffinately have to change those.

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<style type="text/css">
body {
margin: 0;
padding: 0;
background: #fff;

#container {
border: 1px solid #000;
width: 760px;
height: 540px;
margin: 0 auto;
text-align: left;
table {
width: 100%;
height: 100%;
td {
vertical-align: middle;
text-align: center;
<script language="Javascript">
function multilink(link1,link2)
<div id="container">
<div style="width:760px;height:90px;display:block;background:#ccf">
<a href="#" onClick="multilink('roses.html','aa.html');">link A</a>
<a href="#" onClick="multilink('aa.html','roses.html');">link B</a>
<div style="height:400px;width:760px;display:block">
<iframe frameborder="no" scrolling="no" width="760px" height="400px" name="mainframe" src="blah.html"></iframe>
<div style="height:50px;width:760px;display:block">
<iframe frameborder="no" scrolling="no" width="760px" height="50px" name="subframe" src="che.html"></iframe>

Maybe this will help some.

07-13-2005, 02:18 PM
You could accomplish this easily with tables - since this is just three static areas top and tailed by some navigation, I don't see the point here in framesets, iframes or any other more complicated layout. You see, the search engine issue is certainly important, especially if you expect to get business from the site. and frames are difficult to work with and easily broken, as you have found out...

I suggest you look at a 5 row table instead, as an easy to learn/implement alternative. The one benefit I can think of with framesets, that is that you only need to edit one file to change the navigation site wide, is better accomplished with php includes as well.

[m] at
07-13-2005, 08:02 PM
Just make the page how you want it in photoshop, and then use the slice tool combined with "save for web" to automatically generate tables.

It'll be messy as hell, but who cares if it's just a site for yourself.

07-13-2005, 10:26 PM
Wow! Thank you - everybody - for all the sugestions! I'll get to work on it tonight and lt you know how it goes. Thank you so much...