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 Coder
    Join Date
    Dec 2010
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Internet Explorer Homepage design "compressed" in IE, but fine in FF and Safari

    Hi all, I'm a long time lurker and first time poster. Love the site!

    I'm trying my hand at a self hosted wordpress page and I've done several customizations to the index.php file and CSS. After hours of making small edits, I do not believe it is the CSS file anymore (but still not 100% sure).

    I can't say for sure, but it almost looks like a DIV hasn't been closed somewhere when I view the homepage in IE(6,7,8)

    Note that only the home page has this issue:
    http://apptoychest.com/

    While other pages work fine across all browsers:
    http://apptoychest.com/ipad-app-revi...ers-tea-party/

    Any help is appreciated!

  • #2
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,748
    Thanks
    22
    Thanked 1,838 Times in 1,822 Posts
    Hello apptoychest,
    It looks like you're using a lot of padding to position those elements when you should be using margin.
    I'm not sure yet why IE is collapsing the padding like that, still studying that.
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad

  • #3
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,748
    Thanks
    22
    Thanked 1,838 Times in 1,822 Posts
    Check in with the validator. There is an error in your DocType that is probably causing that.

    See the links about validation in my signature line below.




    .
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad

  • #4
    New Coder
    Join Date
    Dec 2010
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts
    It looks like you're using a lot of padding to position those elements when you should be using margin.
    Hmm, great call. Then I guess it could be the CSS. However, other pages are not affected.

    Check in with the validator. There is an error in your DocType that is probably causing that.
    I checked w/ the validator before I posted to see if any red flags popped up. Again, if it's only on that one page, does that mean my homepage needs to be a different DocType? Is it throwing things off because of something that I am declaring in the DocType? Sorry for the noob questions, I've never messed with DocType before...

  • #5
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,748
    Thanks
    22
    Thanked 1,838 Times in 1,822 Posts
    Quote Originally Posted by apptoychest View Post
    I checked w/ the validator before I posted to see if any red flags popped up. Again, if it's only on that one page, does that mean my homepage needs to be a different DocType? Is it throwing things off because of something that I am declaring in the DocType? Sorry for the noob questions, I've never messed with DocType before...
    Both your about and home pages can have the same DocType, that's not the problem here. The validator is saying there is an illegal character in the DocType on your home page ... I'm not seeing it though.

    Since your About page does not have the error, copy the DocType from the about page and use it to replace the one on your Home page.
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad

  • #6
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,865
    Thanks
    160
    Thanked 2,224 Times in 2,211 Posts
    Validator says, there's a BOM present at the top of the page, since you saved the file as utf encoded. See, http://validator.w3.org/check?verbos...oychest.com%2F

    Change the encoding to ANSI or save "without BOM" (notepad++ has an easy option for that.)
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • #7
    New Coder
    Join Date
    Dec 2010
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Validator says, there's a BOM present at the top of the page, since you saved the file as utf encoded
    OK bear with me here... not sure what a Bit Order Mark is, but I have located the code in header.php.

    I also saw that elsewhere in CodingForums that this seems to work:

    <?php
    function writeUTF8File($filename,$content) {
    $f=fopen($filename,"w");
    # Now UTF-8 - Add byte order mark
    fwrite($f, pack("CCC",0xef,0xbb,0xbf));
    fwrite($f,$content);
    fclose($f);
    }
    ?>
    However, I don't want to just "paste and pray" I want to learn what is going on and why this would work... Anyone want to spend a minute helping me to understand so I can avoid this mistake in the future?

  • #8
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,865
    Thanks
    160
    Thanked 2,224 Times in 2,211 Posts
    but I have located the code in header.php.
    Saving that file in notepad++ after changing the "Encoding" may save a lot of hassles.
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • #9
    New Coder
    Join Date
    Dec 2010
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Saving that file in notepad++ after changing the "Encoding" may save a lot of hassles.
    I have _never_ in my computer loving life had such a quick fix work like that. Wahoo!!

    Page works now, I just changed the encoding to "UTF 8 without BOM"

    But why did this work?

    I saw no noticable difference in the actual code within the file, did I miss something? Did it change it to a different file format?

    Thanks so much abduraooft, you are a great help!


  •  

    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
    •