tags:

views:

31

answers:

2
<html>
<link rel="stylesheet" type="text/css" media="screen" href="blogstyle.css">
  <title>Welcome to my blog</title>

  <body>
      <frameset cols="10%,60%,30%" border="0" framespacing="5" frameborder="0">
        <frame src="leftpane.htm" name="left_frame" scrolling="no" />
        <frame src="middlepane.htm" name="middle_frame" scrolling="no" />
        <frame src="rightpane.htm" name="right_frame" scrolling="no" />
      </frameset>




  </body>
</html>

The file leftpane.html contains following code:

<link rel="stylesheet" type="text/css" media="screen" href="blogstyle.css">
<html lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title></title>
    <meta name="generator" content="Studio 3 http://aptana.com/"&gt;
    <meta name="author" content="RP">
    <!-- Date: 2010-10-22 -->
</head>
<body>
      <div id="PhotoBox-Outline" style = "top: 50px; left: 50px">
          <div id="PhotoBox" class="shadow" style = "top: 20px; left: 20px">
          </div>
      </div>

      <div id="PhotoBox-Outline" style = "top: 280px; left: 50px">
          <div id="PhotoBox" class="shadow" style = "top: 20px; left: 20px">
          </div>
      </div>
</body>
</html>

The same code was working when the above div s were in the first code and when I had not defined frameset.

+1  A: 

In the first example with the frames;

<link rel="stylesheet" type="text/css" media="screen" href="blogstyle.css">
  <title>Welcome to my blog</title>

should probably look like;

<head>
<link rel="stylesheet" type="text/css" media="screen" href="blogstyle.css">
<title>Welcome to my blog</title>
</head>

Also in the left pane;

<link rel="stylesheet" type="text/css" media="screen" href="blogstyle.css">
<html lang="en">
<head>

I believe it is best practice to put the style sheet within the head tag;

<html lang="en">
<head>
<link rel="stylesheet" type="text/css" media="screen" href="blogstyle.css">

See http://www.w3.org/TR/html401/struct/links.html for an example.

imbadatjquery
Still not working.
RPK
+1  A: 

When you use frameset you use it instead of body. Just remove your body and /body tags in the main html file.

http://www.w3.org/TR/html4/present/frames.html

"A standard document has one HEAD section and one BODY. A frameset document has a HEAD, and a FRAMESET in place of the BODY."

RD