We help IT Professionals succeed at work.

We've partnered with Certified Experts, Carl Webster and Richard Faulkner, to bring you two Citrix podcasts. Learn about 2020 trends and get answers to your biggest Citrix questions!Listen Now

x

multiple iframes on one page

jonlondon12
jonlondon12 asked
on
Medium Priority
291 Views
Last Modified: 2008-02-01
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>


Comment
Watch Question

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

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts

Author

Commented:
Oleksiy G thanks a million!

Much appreciated!
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.