top left
The HTML Source Logo


 html
Top Right
    
 Getting StartedHow Do I...TroubleShootingPromotionContact Us
 html
HTML
SEARCH THE SITE
advanced search



CATEGORIES
Home
Getting Started
HTML Cheat Sheet
Webmaster Tools
HTML Help Forum
Color Codes
Link to us









































bottom
HTML HTML HTML HTML

Why aren't my frames working?


Why?

       You need 3 things to display frames. First a page that defines a frameset, (the page that puts all the frames together), second, the pages to appear in the frames, and third, a browser that can display frames. If you are missing any of these things, you will get errors, a blank page, or just one page with no frames.


How to fix it

1. Does your frame page have a <BODY>, well it shouldn't. A frames page should not have a <BODY> section in it, because it will ignore the <FRAMESET< and <FRAME> tags, and instead display the contents of the <BODY> section. If your page does have a <BODY> section, delete it so that the <FRAMESET> tag immediately follows the ending </HEAD> tag. If you have content in the <BODY> section that you want displayed on the page, just put it in the actual framed pages.

2. In the <FRAMESET> tags on your frames page, you must make sure you specify row heights, and column widths using the rows and cols attributes, otherwise not all of your frames will appear. For every <FRAME> or <FRAMESET> tag the frameset contains, specify a width or height in pixels or percent, or specify an asterisk (*) to indicate that the browser should divide available space. For example:

The following defines a frames set with two side by side frames, the first 120 pixels wide and the other taking the remainder of the browser window

<frameset cols="120,*">
      <frame src="rightframe.html">
      <frame src="main.html">
</frameset>

3. Make sure that every <FRAME> tag specifies a file with the src attribute, otherwise that frame will appear blank. Not only that, make sure the page exists, if it doesn't you will get an error message ("Page Not Found").

4. If you use a browser that doesn't support frames, such as a text-only browser Lynx, you need to add a <NOFRAMES> section at the end of your frameset definition, just above the final </FRAMESET> tag. You can include an entire pages <BODY> section, or just a hyper link to a non-frame version of your page, or a link to a newer browser. For example:

<noframes>
   <body bgcolor="#FFFFFF">
      <center>
      <font color="blue">Your browser does not support frames</font><br>
      <a href="http://www.microsoft.com">CLICK HERE</a> to upgrade.
      </center>
   </body>
<noframes>




Company   |   Careers   |   Partners   |   Advertising   |   Help
Privacy Policy   |   Trademark Notices   |   User Agreement
2001 TheHTMlSource.com, INC. All Rights Reserved.



Site hosted by Angelfire.com: Build your free website today!