开发者

Everything is way off in IE7 & IE8

开发者 https://www.devze.com 2023-01-13 16:13 出处:网络
It\'s just insane, I\'ve made soo many websites and still it seems every time IE7 and IE8 behave diffe开发者_如何学编程rently every time!!

It's just insane, I've made soo many websites and still it seems every time IE7 and IE8 behave diffe开发者_如何学编程rently every time!!

I'm working on a friends website: Class One

Except I can't seem to get my head around why IE7 and 8 seem to be adding in extra spacing. The positioning of the text overlay div on the jquery slider is off a few pixels and wont cover the full width and the inner div float left content just looks way off, why wont it meet the float right, the maths is right!

I would normally attach code if I knew the problem area but It would be an awful lot of css and html to attach so just put the link up instead.

Thanks in advance!

P.S. I am aware of the php error code, I am getting the hosting provider to sort that as I type! :)

Turns out the php warning is before the doc type so this maybe it?


The major problem here is the DOCTYPE. This tag must be the first tag in you code, but isn't, because of the PHP Warning. See:

<br />
<b>Warning</b>:  mkdir() [<a href='function.mkdir'>function.mkdir</a>]: Permission denied in <b>C:\Program Files\HSphere\3rdparty\PHP\PHP5\prepend.php</b> on line <b>33</b><br />
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

Change beginning of output to

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

If you don't put this tag in the first line, IE will activate quirks mode, and very strange things will happen. When a browser activate quirks mode, many things change, as box model.

NOTE: many browsers has quirks mode, not only IE (I know that firefox has too).


Note: correct use of DOCTYPE will reduce the differences between IE7 and IE8, but not remove all of them.


Ever heard of the IE box model? It's so fun.

Here's some info:
http://stuffthathappens.com/blog/2007/09/12/ie-and-the-css-box-model-wronger-than-wrong/

Summary of IE hacks found to deal with your problems:
http://www.positioniseverything.net/articles/ie7-dehacker.html

Differences in IE 8:
http://www.evotech.net/blog/2009/03/ie8-css-support/

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号