Results 1 to 2 of 2

Thread: iFrames Help

  1. #1
    Ryya Guest

    Unhappy iFrames Help

    Experience: Somewhere in the middle.
    My Example: straycreations.com


    I'm using one main iFrame with targeted navigation and it's NOT WORKING. Works in chrome, not firefox, not IE. I click a navigation link and it opens in a new tab, instead of opening in the target iframe. Heres what i'm working with:

    Code:
    <div id="DivHome"> <a href="arcade.php" target="mainframe"><strong><font color="white">Home</font></strong></a></div>
    <div id="DivConstruction"> <a href="under_construction.php" target="mainframe"><strong><font color="white">Construction</font></strong></a></div>
    and heres my iframe.

    Code:
    <iframe scrolling="no" SRC="arcade.php" marginwidth="0" marginheight="0" frameborder="0" vspace="0" hspace="0" width="100%" height="100%" id="_iframe">
    aaand my style.css.

    Code:
    #DivHome {
    	position:absolute;
    	left:42px;
    	top:113px;
    	width:39px;
    	height:21px;
    	font-size: 16pt;
    	font-family:Tahoma, Geneva, sans-serif;
    }
    a {
    	font-size: 14px;
    	color: #FFF;
    }
    a:visited {
    	color: #000;
    	text-decoration: none;
    }
    a:hover {
    	color: #0F0;
    	text-decoration: underline;
    }
    a:active {
    	color: #000;
    	text-decoration: none;
    }
    a:link {
    	color: #FFF;
    	text-decoration: none;
    }
    body,td,th {
    	color: #000;
    }
    
    
    
    #DivConstruction {
    	position:absolute;
    	left:91px;
    	top:113px;
    	width:50px;
    	height:21px;
    	font-size: 16pt;
    	font-family:Tahoma, Geneva, sans-serif;
    }
    a {
    	font-size: 14px;
    	color: #FFF;
    }
    a:visited {
    	color: #000;
    	text-decoration: none;
    }
    a:hover {
    	color: #0F0;
    	text-decoration: underline;
    }
    a:active {
    	color: #000;
    	text-decoration: none;
    }
    a:link {
    	color: #FFF;
    	text-decoration: none;
    }
    body,td,th {
    	color: #000;
    	text-align: left;
    }
    Please help? I know it is something really silly, it has to be. Just can't figure it out.

  2. #2
    Join Date
    Feb 2006
    Location
    Salisbury UK
    Posts
    4,332
    Your iframe should have a name="mainframe" to match the target:-
    Code:
    <iframe name="mainframe" scrolling="no" SRC="arcade.php" marginwidth="0" marginheight="0" frameborder="0" vspace="0" hspace="0" width="100%" height="100%" id="_iframe">
    I know name="..." is deprecated in favor of id="..." in many cases but iframes still seem to need name="..."
    Code downloaded to my PC will be deleted in due course.
    WIN7; IE9, Firefox, Opera, Chrome and Safari for Windows; screen resolution usually 1366*768.
    Also IE6 on W98 with 800*600 and IE8 on Vista 1440*900.

Similar Threads

  1. iFrames
    By Barbel in forum General Questions
    Replies: 0
    Last Post: 15 Mar 2009, 06:47 AM
  2. Iframes or something like them?
    By Cavemonster in forum Web Design, HTML Reference and CSS
    Replies: 1
    Last Post: 19 Mar 2008, 02:39 AM
  3. iFrames
    By MasterAries7 in forum Client & Server Side Scripting (PHP, ASP, JavaScript)
    Replies: 0
    Last Post: 22 Jun 2006, 10:22 AM
  4. iframes
    By evilelvis in forum Web Design, HTML Reference and CSS
    Replies: 0
    Last Post: 10 May 2006, 04:05 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •