1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

HTML frames

Discussion in 'Software Development' started by compstudent, Oct 3, 2003.

Thread Status:
Not open for further replies.
Advertisement
  1. compstudent

    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!
     
  2. Squashman

    Squashman Trusted Advisor

    Joined:
    Apr 4, 2003
    Messages:
    19,783
    You put your content in the frames. You need to put your code in the left.htm and right.htm files.
     
  3. Squashman

    Squashman Trusted Advisor

    Joined:
    Apr 4, 2003
    Messages:
    19,783
    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>
     
  4. Squashman

    Squashman Trusted Advisor

    Joined:
    Apr 4, 2003
    Messages:
    19,783
    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.
     
  5. compstudent

    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>
     
  6. Squashman

    Squashman Trusted Advisor

    Joined:
    Apr 4, 2003
    Messages:
    19,783
    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">
     
  7. Squashman

    Squashman Trusted Advisor

    Joined:
    Apr 4, 2003
    Messages:
    19,783
  8. Sponsor

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 733,556 other people just like you!

Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/169179

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice