Matvei
Matvei

Reputation: 323

Why are the frames in my code not showing up?

I'm trying to make a basic two frame menu/content system, but for the life of me I can't get the frames to show up. Here's the code.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<link rel="stylesheet" type="text/css" href="poetry.css" />
    <body>
        <div id="container">
        <div id="header">
            <table id="navbar" align="center"><tr>
                <td class="link"><a href="index.html">Home</a></td>
                <td class="link"><a href="poetry.html">Poetry</a></td>
                <td class="link"><a href="essays.html">Essays</a></td>
                <td class="link"><a href="stories.html">Stories</a></td>
                <td class="link"><a href="about.html">About</a></td>
                <td><p id="icon">Craig InTheDell</p></td>
            </tr></table>
        </div>
        <div id="main">
            <frameset cols="30%, 70%">
            <frame src="temp.html">
            <frame src="content.html">
            </frameset>
        </div>
        </div>
        <div id="footer">
            <div id="image"></div>
        </div>
    </body>
</html>

Upvotes: 0

Views: 245

Answers (1)

Quentin
Quentin

Reputation: 944172

If you want to place frames inside a document, then you must use <iframe>s.

A <frameset> and <frames> may only appear in a frameset document, where they appear instead of the <body>.


Frames (of all kinds) are, however, problematic and I recommend looking at alternatives as well as not using tables for layout (your navigation is better expressed as a list) and performing basic, automated QA on your markup.

Upvotes: 2

Related Questions