CSS2 height attribute invalidation problem in IE9_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 12:15:54
Original
1587 people have browsed it

I drew a point on the page using a div tag, but the height of this point is still the default height when set to 1px, and the point cannot be drawn successfully. The HTML code is as follows:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><title></title></head><body><div style="position:absolute; left:100px; top:100px; height:2px;width:2px;background-color:#FF0000"></div></body></html>
Copy after login

The effect is as follows: [img=http://my.csdn.net/my/album/detail/1332440#1332440][/img]
http://my.csdn .net/my/album/detail/1332440#1332440

Please help me!


Reply to discussion (solution)

Protocol issues
Put

changed to


Just fine

Not bad. . The type of declaration is the issue. .
Protocol issues
Change

to


Just fine

Thank you, the problem has been solved, declaring it as will be risky in old browsers, so it is not the best choice, mine The problem is the browser mode, adjust it and it will be fine. But thank you for your enthusiasm, and the points will be given to you.

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template