Frames question

liunx

Guest
Hi there, i have a site, with a title-frame, a middleframe and a lower-frame.<br />
<br />
But the titleframe is not big enough, the logo i want to put in it is not shown completely.<br />
<br />
here's the code<br />
<br />
<html><br />
<br />
<title>titleframe</title><br />
<base target="onder"><br />
</head><br />
<br />
<body bgcolor="#204658" topmargin="0" leftmargin="0" marginwidth="0" marginheight="0"><br />
<table width="800" border="0" cellpadding="0" cellspacing="0"><br />
<tr> <br />
<td width="516" height="80" valign="top"><img src=http://www.htmlforums.com/archive/index.php/"Grafisch/banners/gif/Metal/Left.gif" width="516" height="80"></td><br />
<td width="52" valign="top"><a href=http://www.htmlforums.com/archive/index.php/"http:%5C%5Ctvdnlam75%5Cvdi2001%5Clol"><img src="Grafisch/banners/gif/Metal/middle.gif" width="52" height="80" border="0"></a></td><br />
<td width="82" valign="top"><img src=http://www.htmlforums.com/archive/index.php/"Grafisch/banners/gif/Metal/right.gif" width="82" height="80"></td><br />
<td width="150"></td><br />
</tr><br />
<tr> <br />
<td height="120"></td><br />
<td></td><br />
<td></td><br />
<td></td><br />
</tr><br />
</table><br />
<br />
<br />
What am i doing wrong?<!--content-->It is not actually in this code that you need to specify the frame sizes, you need to do that in the frameset. I'm a bit rusty with frames but I believe what you do is this:<br />
<br />
<frameset cols="*" rows="100,400,100"> <br />
<frame src=http://www.htmlforums.com/archive/index.php/"...." name="...."><br />
<frame src=http://www.htmlforums.com/archive/index.php/"...." name="...."><br />
<frame src=http://www.htmlforums.com/archive/index.php/"...." name="...."><br />
</frameset><br />
<br />
Obviously, you can change the sizes of the rows to suit your design.<br />
<br />
Hope this helps.<!--content-->Hi WijBenga,<br />
<br />
The code you are given is the titleframses code??<br />
Or index page code??<br />
Well, I assumed that you know the html.<br />
You can do the changes in the framsets rows. so that you can fix the size for the titleframe according to the logo which you put in titleframe.<br />
If you have any further doubt please ask..<br />
<br />
Amruta..<br />
<br />
<br />
Sample CODE:--<br />
<br />
<html><br />
<head><title>Main Page</title><br />
<br />
</head><br />
<br />
<framset rows="5%,*,5%" framespacing="0" frameborder="0" frameborder="0"><br />
<br />
<frame src=http://www.htmlforums.com/archive/index.php/"top.htm" name="topframe" scrolling="no" framespacing="0" marginwidth="0" marginheight="0" noresize> <br />
<frame src=http://www.htmlforums.com/archive/index.php/"middle.htm" name="middleframe" scrolling="auto" framespacing="0" marginwidth="0" marginheight="0" noresize> <br />
<frame src=http://www.htmlforums.com/archive/index.php/"bottom.htm" name="bottomframe" scrolling="no" framespacing="0" marginwidth="0" marginheight="0" noresize> <br />
</frameset> <br />
</html><!--content-->Isn't that what I just said? :confused:<!--content-->Hi,<br />
I'm not sure why you're using a table if you want to use frames?<br />
<br />
You WILL need to use the <frameset> tags to set up your three frames. All you need is:<br />
<br />
<frameset rows="25%,60%*"> <!-- creates 3 frames --><br />
<frame scr="title.html"> <!-- logo placeholder --><br />
<frame scr="middle.html"> <!-- main placeholder --><br />
<frame scr="lower.html"> <!-- bottom placeholder --><br />
</frameset><br />
<br />
This sets horizontal frames (rows) for your logo of <br />
a) 25% of the screen size at the top of the screen,<br />
b) 60% of screen size for the middle page, and <br />
c) the asterisk tells the browser to use the remaining space (15% in this case)for the lower frame. <br />
<br />
The browser will load the title.html, middle.html and lower.html files into the three frames. If you want to target the middle frame, then name it like this;<br />
<br />
<frame scr="middle.html" name="ongar"> <!-- main placeholder --><br />
<br />
and your hyperlinks in the other documents will change the content in this frame.<br />
<br />
Also,<br />
a) Try to make sure that your html code is correct (e.g. you have a </head> tag, but no start <head> tag).<br />
<br />
b) Use comments freely to break up your code, so that you (and others) can tell what your code is trying to do. The comments are in the <!-- --> tags.<br />
<br />
c) I find using an ID tag to keep track of table cells helps - especially with complicated tables. For example, try <br />
<tr id="r1><br />
<td id="r1c1"></td><br />
<td id="r1c2"></td><br />
</tr><br />
<tr id="r2"><br />
<td id="r2c1"></td><br />
<td id="r2c2"></td><br />
<br />
I hope that helps, but if not please email and I'll try to assist.<br />
<br />
Colin<!--content-->I don't think there is anything wrong with using tables inside frames if it helps you achieve the layout that you want, so long as you don't let it get too complicated. Frames are not a direct alternative to tables, in fact they are very different things. They both have their different advantages and limitations, and it is okay to use a combination of both to achieve the layout that you want.<!--content-->Thanx, im beginning to understand the frame codes, but what i do not understand is the source part. e.g. i have build a menu in my middle frame, wich contains buttons, and the target of the buttons should be loaded in the lowerframe, what should i do to achieve that?<br />
<br />
And the other thing i want is to get rid of those borders, i see thick grey lines between them frames, how do i do that?<!--content-->Hi again!<br />
Q1 "the target of the buttons should be loaded in the lowerframe, what should i do to achieve that?"<br />
<br />
Use the "target" attribute. For example: <br />
If you have set 2 horizontal frames like this<br />
*****************<br />
<frameset rows="60%,40%"><br />
<frame src=http://www.htmlforums.com/archive/index.php/"middleframe.html" name="main" scrolling="Auto" frameborder="0"><br />
<frame src=http://www.htmlforums.com/archive/index.php/"lowerframe.html" name="footer" scrolling="Auto" frameborder="0"><br />
</frameset><br />
*****************<br />
<br />
where the main content frame is called "main" and the lower frame is called "footer", you can write<br />
something like<br />
<br />
************<br />
<body><br />
<p>This is the content for the lower frame</p><br />
<br />
<p>You can use links to <a href=http://www.htmlforums.com/archive/index.php/"newfile.html" target="footer">load new content</a> into the lower frame.</p><br />
</body><br />
**************<br />
<br />
and "newfile.html" will load into the frame called "footer". If you leave out the "target='footer'" bit, "newfile.html" will load into the same frame that the links are in.<br />
<br />
Q2 "get rid of those borders"? Use 'frameborder="0"' as shown above.<br />
Ok?.<!--content-->Originally posted by Goldilocks <br />
I don't think there is anything wrong with using tables inside frames if it helps you achieve the layout that you want, so long as you don't let it get too complicated. Frames are not a direct alternative to tables, in fact they are very different things. They both have their different advantages and limitations, and it is okay to use a combination of both to achieve the layout that you want. <br />
<br />
<br />
Well put!<!--content-->
 
Back
Top