div在不同的浏览器上显示不同 [英] divs appearing different on different browsers

查看:108
本文介绍了div在不同的浏览器上显示不同的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这个网页在Firefox上显示完美,但在IE& chrome: http://camethra.com/?p=76



在IE:整个容器div是对齐的。



在chrome上:帖子重叠到评论部分。



谢谢



您的网页正在呈现 Quirks Mode 在IE中,这就是为什么它看起来在这个浏览器破碎。



您得到怪癖模式的原因是两个 UTF-8字节顺序标记开始时您的档案:

  ef bb bf ef bb bf 3c 21 44 4f 43 
。 。 。 。 。 。 < ! D O C

您需要保存没有此文件的文件。



要修复Chrome,您应该修复验证错误,特别是这样:

 未完成的ul的结束标记


This page is appearing perfect on firefox, but differently corrupt on IE & chrome: http://camethra.com/?p=76.

on IE: the whole container div is right aligned.

on chrome: the post is overlapping onto the comments section.

Can you help me fix that?

thank you

解决方案

The other answers are correct, but not quite there.

Your page is rendering in Quirks Mode in IE, and that's why it looks broken in this browser.

The reason you're getting Quirks Mode is the two UTF-8 byte order marks at the start of your file:

ef bb bf ef bb bf 3c 21 44 4f 43
.  .  .  .  .  .  <  !  D  O  C

You'll need to save your file without this. It should be an option in whatever editor you're using.

To fix Chrome, you should fix the validation errors, particularly the ones like this:

end tag for "ul" which is not finished

这篇关于div在不同的浏览器上显示不同的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆