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 5 of 5
  1. #1
    New Coder
    Join Date
    Aug 2007
    Posts
    21
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Internet Explorer 7 and 8 add padding inside iframe

    Hello all,

    Don't know how to demonstrate this problem other than through either interpretative dance or pictures:

    Internet Explorer:


    Other browsers:


    Basically, IE adds some crazy padding to the iframe, where the main content resides (don't ask why I used an iframe - long story).

    Is there a way to fix this in CSS?

    The URL in question is http://autorotation.org/html/index.php?page=alias-2

    Many thanks!

    S

  • #2
    New Coder
    Join Date
    Mar 2010
    Location
    London
    Posts
    78
    Thanks
    0
    Thanked 19 Times in 17 Posts
    the problem is not with the iframe, but with the css of your page loaded in the iframe - have a look at it in IE7, you get the same strange behaviour:
    http://www.landscapehd.com/store2/index.php

    my first suggestion would be, remove the position:absolute from div#container (styles.css, line 44)

    IE notoriously handles it in a bad way. I presume that you added it to reduce the 12px gap - this can be achieved in a different way, if removing position:absolute works as I suspect

    HTH
    Luca
    http://www.zen-angel.com

  • #3
    New Coder
    Join Date
    Aug 2007
    Posts
    21
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Thanks Luca.

    I'm afraid removing position and top didn't solve the problem at all.
    Any other ideas?

    Just out of interest: how would you get rid of the 12px gap without using position?

    Many thanks,

    Shmoyko

  • #4
    New Coder
    Join Date
    Mar 2010
    Location
    London
    Posts
    78
    Thanks
    0
    Thanked 19 Times in 17 Posts
    try adding

    Code:
    width:1120px;
    margin:0 auto;
    float:left;
    to #container. that should work.

    you can get rid of
    Code:
    margin-left:auto;
    margin-right:auto;
    I've incorporated this in the css above - also, margin:auto does not work if there is no fixed witdh specified.

  • Users who have thanked zen-angel for this post:

    shmoyko (04-07-2010)

  • #5
    New Coder
    Join Date
    Aug 2007
    Posts
    21
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Thanks! Brilliant. It work.

    Cheers!


  •  

    Tags for this Thread

    Posting Permissions

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