HTML frames

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

compstudent

Thread Starter
Joined
Aug 14, 2003
Messages
26
hi! i'm new to html and just learned the basics from a few online tutorials. i started building my very 1st html website using geocities. a plain site seems to work but when i tried to practice adding frames, the frames worked but the body/contents inside the frame didn't.

<html>
<head>
<title>title goes here</title>
</head>

<frameset cols="15%, 25%">
<frame src="left.htm" name="menu">
<frame src="right.htm" name="main">
</frameset>
<noframes>
</noframes>
<body>anything goes</body>
</html>

my questions:

1) do i really need to include <noframes></noframes>?
2) do i need to open a new file for the contents and a separate file for making frames?
3) how can i put 2 different bgcolor for each frame?
4) how can i put the contents inside the frames? i mean where will i insert the codes?

some tutorials are easy to understand but putting the contents inside the frame confuses me.

please help!


thanks!
 

Squashman

Trusted Advisor
Joined
Apr 4, 2003
Messages
19,786
You put your content in the frames. You need to put your code in the left.htm and right.htm files.
 

Squashman

Trusted Advisor
Joined
Apr 4, 2003
Messages
19,786
Here is what I did for one site that I created.

<!--create two row wise frames-->


<!--make the first row a static logo, and the second the body of the page-->

<frameset rows="60,*" frameborder=no>
<frame name="maintop" src="button.html" TITLE="Navigation Bar" marginwidth=0 marginheight=0 scrolling="no" LONGDESC="n
avigatepurpose.txt">


<frame name="mainbottom" src="main.shtml" TITLE="Frame Changed by Navigation Bar" LONGDESC="contentpurpose.txt">
</frameset>

<noframes>
<body>
<ul>
<li><a href="button.html" title="Top of the framed site">Navigation Bar For Framed Site</a></li>
<li><a href="main.shtml" title="Bottom of the framed site">Bottom Frame That Changes By Top Frame</a></li>
</ul>
</body>
</noframes>
 

Squashman

Trusted Advisor
Joined
Apr 4, 2003
Messages
19,786
So basically what I have there is Two Frames. A top frame (button.html) and a bottom frame (main.shtml). If the browser does not support frames it will create two links on a web page to the html files that make up the frames.

You need to move your Body tags inside the No Frame tags so something will show up if the browser does not support frames.

Put some code into your left.htm and right.htm files.
 

compstudent

Thread Starter
Joined
Aug 14, 2003
Messages
26
thanks for ur reply LwdSquashman!

where did you place the codes for the content of your frames? did you make a new page for that? i like to color my frames but i don't know where to place the codes. where will i insert the bgcolor and text in this codes? please explain more. thank you again.

<html>
<head><title></title>
</head>

<frameset cols="15%, 25%">
<frame src="left.htm" name="menu">
<frame src="right.htm" name="main">
</frameset>
<noframes>
</noframes>
<body>anything goes</body>
</html>
 

Squashman

Trusted Advisor
Joined
Apr 4, 2003
Messages
19,786
Originally posted by compstudent:
thanks for ur reply LwdSquashman!

where did you place the codes for the content of your frames

<frame src="left.htm" name="menu">
<frame src="right.htm" name="main">
You are declaring that right there. You are telling your index.html file to display these two files as your frames. That is why I said to put some code into your left.htm and right.htm files. Treat them just like regular html files. You need HTML, HEAD and BODY tags in those files as well.

Background color is always defined in the BODY tag.
<body bgcolor="red">
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 807,865 other people just like you!

Latest posts

Top