views:

58

answers:

2

First of all, why use a frame set in the first place you ask?

answer: Because my boss told me.

That been said, I have 2 files. Index.html and Head.html.

Contents of index.html:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/frameset.dtd"&gt;
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
        <title>Site Title</title>
    </head>
    <frameset rows="122,*" FRAMEBORDER=NO FRAMESPACING=2 BORDER=0>
        <frame name="t" src="head.html" scrolling="no" marginheight="0" marginwidth="0">
        <frame name="b" src="http://www.website.com"&gt;
    </frameset>
    <noframes>
        <p>You have frames turned off on your browser, please turn it on and reload this page.</p>
    </noframes>
</html>

Contents of head.html:

<div style="border-bottom:2px solid #000;height:120px">
    <center>This is the frame head.</center>
</div>

The code works fine in all browsers except Internet Explorer 7 and 8 (I don't care about 6). Is there anything I am doing wrong, and if not then can the same effect be achieved without frames and if so how?

A: 

@ricebowl If you run the 2 pages you will see that the website trying to be framed does not show up at all in IE but does show up in all other browsers.

Cameroon
@Cameroon - You should use the "add comment" facility for this kind of info or edit your original question - Don't create a new answer.
Martin Smith
@Martin Smith - sorry, I couldn't use add comment because I am not logged in under the original username, I'm not registered and cleared my cookies by accident. Anyway, thanks for pointing out the unclosed frame tags. However the problem still persists.
Cameroon
@Cameroon I've deleted my answer anyway as I'm not sure that end tags are required looking at the example here http://www.w3.org/TR/REC-html40/present/frames.html. The w3 validator http://validator.w3.org/check complains about some errors - Not sure if fixing these will help?
Martin Smith
By the way your posted HTML works fine for me in IE8 when I create those 2 pages.
Martin Smith
A: 

i tried in IE 7,it works well.i don't know exactly what is your problems。

huangli