multiple iframes on one page

Hi there,

I have 2 iframes on one page. one is supposed to appear in the right column and one in the center. They are both appearing in the center side by side.

The code is as follows: Any help  would be much appreciated!


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">



<html xmlns="http://www.w3.org/1999/xhtml" >
<head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /><title>
      Untitled Page
</title><link rel="stylesheet" href="StyleSheet.css" /></head>
<body>
    <form name="aspnetForm" method="post" action="viewStory.aspx?storyId=8" id="aspnetForm">
<div>
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwULLTExNDk5OTk1NTBkZDBeA8Z6wHiYhC7n9SUYLCjRrltw" />
</div>

    <div>
        <table width="750" id="tableLayout" align="center">
            <tr>
                <td style="width: 151px">
                    <img src="images/news.jpg" alt="newpaper logo" />
                </td>
                <td style="width: 500px">
                    <h1>The Poole Gazzette</h1>
                </td>
                <td>
                </td>
            </tr>
            <tr>
                <td style="width: 151px" valign ="top">
                    <h3>Categories</h3>
                    <div id="storyMenu">
                        <ul><li><a href="viewStories.aspx?category=bulletins">bulletins</a></li><li><a href="viewStories.aspx?category=hello">hello</a></li><li><a href="viewStories.aspx?category=new">new</a></li><li><a href="viewStories.aspx?category=Politics">Politics</a></li><li><a href="viewStories.aspx?category=Sport">Sport</a></li><li><a href="viewStories.aspx?category=story">story</a></li><li><a href="viewStories.aspx?category=Weather">Weather</a></li></ul>

                     </div>
                     <h3>Member Tools</h3>
                     <div id="userTools">
                         <ul>
                             <li><a id="ctl00_HyperLink3" href="addStory.aspx">Add/Edit Stories</a></li>
                             <li><a id="ctl00_HyperLink2" href="addCategory.aspx">Add/Edit Categories</a></li>
                             <li><a id="ctl00_HyperLink1" href="addImage.aspx">Add/Edit Images</a></li>
                             <li><a id="ctl00_HyperLink4" href="login.aspx">Login</a></li>
                        </ul>
                     </div>
                 </td>
                <td style="width: 500px" valign="top">
                   
                    <div id="content">
    <div>
        <div>Jon London 20/03/2006 22:18:53</div>
         <div>
            <h2>west ham overcome a late fightback from man city</h2>
         </div><div><p class="storyText">Dean Ashton scored twice to lead West Ham into the semi-finals of the FA Cup at the expense of 10-man Manchester City at Eastlands.
Ashton opened his account in the first half when he lashed home past keeper David James from inside the area.
</p></div><div class="imageAndCaption"><img src="C:\Documents and Settings\jono\My Documents\My Pictures\westham.jpg" alt="excellent!!" /><p>nice caption</p></div><div><iframe id="maps" height="250" width="250" src ="map.aspx?postCode=KT138AB   " scrolling="no" frameborder="0" /></div>
   
    </div>

                    </div>
                </td>
                <td valign ="top" >
                    <iframe height="270"  id="rss" width="180" src ="rss/example_rss.aspx" scrolling="no" frameborder="0" />
                    <br />
                   

                </td>
            </tr>
            <tr>
                <td style="width: 151px">
                </td>
                <td style="width: 500px">
                </td>
                <td>
                  <p>
                    <a href="http://validator.w3.org/check?uri=referer"><img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0 Transitional" height="31" width="88" /></a>
                  </p>

                </td>
            </tr>
        </table>
        <br />
        <br />
        &nbsp;</div>
    </form>
</body>
</html>


jonlondon12Asked:
Who is Participating?
 
Oleksiy GaydaCommented:
Hello jonlondon12,

You cannot collapse iframe tags, that's why you are having issues with yours. Each <iframe> has to be terminated by </iframe> even if it's empty like XHTML 1.0 allows you to:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Page</title>
<link rel="stylesheet" href="StyleSheet.css" />
</head>

<body>

<form name="aspnetForm" method="post" action="viewStory.aspx?storyId=8" id="aspnetForm">
      <div>
            <input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwULLTExNDk5OTk1NTBkZDBeA8Z6wHiYhC7n9SUYLCjRrltw" />
      </div>
      <div>
            <table width="750" id="tableLayout" align="center">
                  <tr>
                        <td style="width: 151px">
                        <img src="images/news.jpg" alt="newpaper logo" /> </td>
                        <td style="width: 500px">
                        <h1>The Poole Gazzette</h1>
                        </td>
                        <td></td>
                  </tr>
                  <tr>
                        <td style="width: 151px" valign="top">
                        <h3>Categories</h3>
                        <div id="storyMenu">
                              <ul>
                                    <li><a href="viewStories.aspx?category=bulletins">bulletins</a></li>
                                    <li><a href="viewStories.aspx?category=hello">hello</a></li>
                                    <li><a href="viewStories.aspx?category=new">new</a></li>
                                    <li><a href="viewStories.aspx?category=Politics">Politics</a></li>
                                    <li><a href="viewStories.aspx?category=Sport">Sport</a></li>
                                    <li><a href="viewStories.aspx?category=story">story</a></li>
                                    <li><a href="viewStories.aspx?category=Weather">Weather</a></li>
                              </ul>
                        </div>
                        <h3>Member Tools</h3>
                        <div id="userTools">
                              <ul>
                                    <li><a id="ctl00_HyperLink3" href="addStory.aspx">Add/Edit
                                    Stories</a></li>
                                    <li><a id="ctl00_HyperLink2" href="addCategory.aspx">Add/Edit
                                    Categories</a></li>
                                    <li><a id="ctl00_HyperLink1" href="addImage.aspx">Add/Edit
                                    Images</a></li>
                                    <li><a id="ctl00_HyperLink4" href="login.aspx">Login</a></li>
                              </ul>
                        </div>
                        </td>
                        <td style="width: 500px" valign="top">
                        <div id="content">
                              <div>
                                    <div>
                                          Jon London 20/03/2006 22:18:53</div>
                                    <div>
                                          <h2>west ham overcome a late fightback from man city</h2>
                                    </div>
                                    <div>
                                          <p class="storyText">Dean Ashton scored twice to lead
                                          West Ham into the semi-finals of the FA Cup at the expense
                                          of 10-man Manchester City at Eastlands. Ashton opened
                                          his account in the first half when he lashed home past
                                          keeper David James from inside the area. </p>
                                    </div>
                                    <div class="imageAndCaption">
                                          <img src="C:\Documents%20and%20Settings\jono\My%20Documents\My%20Pictures\westham.jpg" alt="excellent!!" /><p>
                                          nice caption</p>
                                    </div>
                                    <div>
                                          <iframe id="maps" height="250" width="250" src="map.aspx?postCode=KT138AB" scrolling="no" frameborder="0">
                                          </iframe></div>
                              </div>
                        </div>
                        </td>
                        <td valign="top">
                        <iframe height="270" id="rss" width="180" src="rss/example_rss.aspx" scrolling="no" frameborder="0">
                        </iframe><br />
                        </td>
                  </tr>
                  <tr>
                        <td style="width: 151px"></td>
                        <td style="width: 500px"></td>
                        <td>
                        <p><a href="http://validator.w3.org/check?uri=referer">
                        <img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0 Transitional" height="31" width="88" />
                        </a></p>
                        </td>
                  </tr>
            </table>
            <br />
            <br />
&nbsp;</div>
</form>

</body>

</html>

Hope this helps.

Oleksiy G
0
 
jonlondon12Author Commented:
Oleksiy G thanks a million!

Much appreciated!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.