Results 1 to 3 of 3

Thread: iframe positioning problem in IE

  1. #1
    Join Date
    Apr 2005
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default iframe positioning problem in IE

    Hello,
    I'am having problems getting an iframe to display correctly within a DIV in IE. It looks fine in FireFox, but not in IE (the iframe is displayed below the Div somehow).

    The layout I am working with consists of a header div, left div, content div and a footer div. The content div contains the iframe, this seems to be the problem in IE.

    Can anyone help me please?

    here's my css:

    Code:
    body{
    	background-image: url(../bgImages/bg.jpg);
    	background-repeat: repeat;
    }
    #container {
    	width: 783px;
    	\width: 803px;
    	w\idth: 783px;
    	border: 1px solid gray;
    	margin: 10px;
    	margin-left: auto;
    	margin-right: auto;
    	padding: 10px;
    }
    
    #header {
    	height:92px;
    	padding: 0;
    	margin-bottom: 0;
    	background: #B08F0C url(../bgImages/header.jpg);
    }
    
    #content {
    	padding: 0;
    	margin-left: 133px;
    	height: 429px;
    	width: 650px;
    }
    
    #navLeft {
    	float: left;
    	width: 133px;
    	\width: 133px;
    	w\idth: 133px;
    	margin: 0;
    	margin-right: 0;
    	padding: 0;
    	background-color: #AF8E0B;
    	background-image: url(../bgImages/navLeft.jpg);
    	height: 429px;
    }
    
    #footer {
    	clear: both;
    	padding: 0;
    	margin-top: 0;
    	background-color: #AF8E0B;
    	height: 65px;
    	background-image: url(../bgImages/Footer.jpg);
    }
    here's my html:
    HTML Code:
    <!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>
    <title>Untitled Document</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <link href="css/style.css" rel="stylesheet" type="text/css" />
    </head>
    
    <body>
    	<div id="container">
    		<div id="header"></div>
    
    		<div id="navLeft"></div>
    
    		<div id="content">
    			<iframe id="ifrm" name="ifrm" src="intro.htm" scrolling="yes" width="650" height="429" frameborder="0">
    			</iframe>
    		</div>
    
    		<div id="footer"></div>
    	</div>
    </body>
    </html>
    any help appreciated, this is driving me nuts!
    Thanks,
    Micsten

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Take the </div> tag from navLeft and place it after the one for content:
    HTML Code:
    <body>
    	<div id="container">
    		<div id="header"></div>
    
    		<div id="navLeft">
    
    		<div id="content">
    			<iframe id="ifrm" name="ifrm" src="leaves.html" scrolling="yes" width="650" height="429" frameborder="0">
    			</iframe>
    		</div></div>
    
    		<div id="footer"></div>
    	</div>
    </body>
    The way you had it, IE was showing the iframe where it was placed. I have no idea why FF showed it where it did but, it shows it correctly with this change so, enjoy!
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Apr 2005
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    ahhh, can't believe i didn't try that.. I must have spent two hours trying every other possible thing. guess i got caught up in thinking it was a prob with the css.

    Odd it displayed correctly in FF before the change.

    Thanks a lot man,
    micsten

Bookmarks

Posting Permissions

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