...

View Full Version : Homepage design "compressed" in IE, but fine in FF and Safari



apptoychest
12-10-2010, 02:41 PM
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-review/miss-spiders-tea-party/

Any help is appreciated! :o

Excavator
12-10-2010, 02:54 PM
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.

Excavator
12-10-2010, 03:02 PM
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.




.

apptoychest
12-10-2010, 03:12 PM
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...:confused:

Excavator
12-10-2010, 03:28 PM
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...:confused:

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.

abduraooft
12-10-2010, 03:36 PM
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?verbose=1&uri=http%3A%2F%2Fapptoychest.com%2F

Change the encoding to ANSI or save "without BOM" (notepad++ has an easy option for that.)

apptoychest
12-10-2010, 03:44 PM
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?

abduraooft
12-10-2010, 03:55 PM
but I have located the code in header.php. Saving that file in notepad++ after changing the "Encoding" may save a lot of hassles.

apptoychest
12-10-2010, 05:11 PM
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? :rolleyes:

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! :thumbsup:



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum