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 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Mar 2005
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Styling A 100% width Iframe - IE problem

    Hi folk,

    Excuse me for jumping straight in with a question, just found these forums and hoping one of you guys can help out here.

    I'm trying to style an Iframe to 100% width of the screen so that it appears
    Seemlesly on the page. Trouble is IE is not making this easy as it always seems to put in a right margin. However, It seems to work fine in Firefox.

    Here's the code - does anyone know a way to get rid of the this margin?

    HTML
    Code:
    <iframe name="iframe1" src="http://www.third-party-site.co.uk">
    CSS
    Code:
    iframe{
      position: absolute;
      top: 0em;
      left: 0em;
      z-index: 2;
      frameborder: 0;
      width: 100%;
      height: 300;   
      scrolling: no;
      border-right: 0px; 
      border-top: 0px; 
      border-left: 0px;
      border-bottom: 0px; 
      margin-right: 0px;
    
    }

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    its the default margin of the body element
    Code:
    html,body {
    margin:0px;
    padding:0px;
    }

  • #3
    New to the CF scene
    Join Date
    Mar 2005
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Excellent,

    thanks for that - had totally forgotten about the body margin.

    Moff


  •  

    Posting Permissions

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