Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 9 of 9
  1. #1
    New to the CF scene
    Join Date
    Oct 2007
    Posts
    5
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Positioned Div not working in Iframe in IE7

    Works fine in FF.
    I add:
    <style type="text/css">
    #loadarea {position:fixed;
    left: 310px;
    top: 10px;
    z-index: 100
    }
    </style>
    into the header, then signify the iframe, or just a normal frame with something like <div id="loadarea">, but what I'm trying to position is a frame created by a thumbnail viewer .js. The frame only goes exactly where the code for the frame is put in the body, not at all where the position coordinates tell it to.

    Also, just to be clear, this coding is within the source for an iframe.

    Haven't seemed to be able to find any examples or posts of people having the same issue.
    Hope someone has heard of this before and has an answer!

  • #2
    Senior Coder BarrMan's Avatar
    Join Date
    Feb 2005
    Location
    Israel.
    Posts
    1,644
    Thanks
    69
    Thanked 83 Times in 82 Posts
    Code:
    * html #loadarea{
    position: absolute;
    }
    Last edited by BarrMan; 10-09-2007 at 08:27 AM.

  • #3
    New to the CF scene
    Join Date
    Oct 2007
    Posts
    5
    Thanks
    2
    Thanked 0 Times in 0 Posts
    Thanks. Pretty close, but I do need it to be fixed so I don't have to keep duplicating script to keep the frame viewable while scrolling down the page, so I can keep having the content of the frame changed based on the viewer's mouseovers.

    Is it not possible to do so? If anyone has an alternative I'm all ears (or eyes, for this matter).
    Last edited by SinePhase; 10-09-2007 at 08:49 AM.

  • #4
    Senior Coder BarrMan's Avatar
    Join Date
    Feb 2005
    Location
    Israel.
    Posts
    1,644
    Thanks
    69
    Thanked 83 Times in 82 Posts
    Quote Originally Posted by SinePhase View Post
    Thanks. Pretty close, but I do need it to be fixed so I don't have to keep duplicating script to keep the frame viewable while scrolling down the page, so I can keep having the content of the frame changed based on the viewer's mouseovers.
    Code:
    body{
    	height: 100%;
     overflow-y:auto;
    }
    #loadarea {
    display: block;
    left: 310px;
    top: 10px;
    z-index: 100;
    position:fixed;
    
    }
    * html #loadarea
    {
    	position:absolute;
    }

  • #5
    New to the CF scene
    Join Date
    Oct 2007
    Posts
    5
    Thanks
    2
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by BarrMan View Post
    Code:
    body{
    	height: 100%;
     overflow-y:auto;
    }
    #loadarea {
    display: block;
    left: 310px;
    top: 10px;
    z-index: 100;
    position:fixed;
    
    }
    * html #loadarea
    {
    	position:absolute;
    }
    I tried it like this:

    <style type="text/css">

    body{
    height: 100%;
    overflow-y:auto;
    }
    #loadarea {
    display: block;
    left: 310px;
    top: 10px;
    z-index: 100;
    position:fixed;

    }
    * html #loadarea
    {
    position:absolute;
    }
    </style>

    but it still only positions like it's absolute, not fixed. Maybe I missed something?

  • #6
    New Coder
    Join Date
    Oct 2007
    Posts
    22
    Thanks
    0
    Thanked 4 Times in 4 Posts
    under IE7 position fixed works only in strict mode same as ie6

    http://home.tampabay.rr.com/bmerkey/...ion-fixed.html

  • Users who have thanked _peter_ for this post:

    SinePhase (10-09-2007)

  • #7
    Senior Coder BarrMan's Avatar
    Join Date
    Feb 2005
    Location
    Israel.
    Posts
    1,644
    Thanks
    69
    Thanked 83 Times in 82 Posts
    Do you have a doctype?
    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    Edit: Oh, just saw peter's post. Yea he's right. You need to have the doctype.

  • Users who have thanked BarrMan for this post:

    SinePhase (10-09-2007)

  • #8
    New to the CF scene
    Join Date
    Oct 2007
    Posts
    5
    Thanks
    2
    Thanked 0 Times in 0 Posts
    That did it! Thanks a lot and for saving me a bigger head ache. I appreciate the help!

  • #9
    New to the CF scene
    Join Date
    Oct 2007
    Posts
    5
    Thanks
    2
    Thanked 0 Times in 0 Posts
    Just wanted to mention something a little weird about this: without that doctype, absolute positioning works fine for the main frame, but to position the frame from within the source of an iframe, I do have to put the doctype at the top or use the coding:

    * html #loadarea{
    position: absolute;
    }

    No big deal, just confused why it makes a difference?


  •  

    Posting Permissions

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