Problems in IE without doctype

五迷三道 提交于 2019-12-14 03:08:58

问题


I have a specific problem by a fixed bar. I would to use this fixedbar but I sould n't use doctype This bar in IE have problems. for example bar by scroll is not fixed and move or size of tooltips changed. In fact, my project owner don't let me to use of doctype

http://ryan.rawswift.com/sandbox/jixedbar-0.0.2/demo/

Edit: Hi to all , that is right. but exceptionally, I must start html file whth "html tag" in this project! It is good that you help me to fixed this bar when scroll change. Other problems isn't important….


回答1:


If you are referring to IE6 (are you??), then there would be an issue that is possibly related to the use of the css style position:fixed; because IE6 does not support this css property.

However, if the author has done this in jQuery, one would expect there to possibly be a fix implemented for this.

Onto the topic of doc types, you say that there is an issue in IE without doc types. Generally there would be a problem in many browsers without declaring a doc type. While many will revert to a default doc type, it is common (and very good) practice to specify your doc type based on your code (HTML, XHTML, HTML 5.0 etc etc).

Kind regards, Simon




回答2:


IE8 (maybe 7 as well, forget about 6) behaves almost up to standard when you use a STRICT DOCTYPE, so use the XHTML STRICT DOCTYPE:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">


来源:https://stackoverflow.com/questions/5013978/problems-in-ie-without-doctype

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!