Home  >  Article  >  Web Front-end  >  [One of the crazinesses of IE6] BUG_html/css_WEB-ITnose with odd width and height in IE6

[One of the crazinesses of IE6] BUG_html/css_WEB-ITnose with odd width and height in IE6

WBOY
WBOYOriginal
2016-06-24 12:34:09872browse

IE6 is just crazy. Today, the project needs to make such a layout: an external relatively positioned div, an internal absolutely positioned div (right: 0),

as shown in the picture:

However, when viewed under IE6, it becomes the effect of right:1px:

IE6 also has an odd width and height bug. The solution is to change the width of the external relatively positioned div to an even number. The height is also the same
View source code:

CSS code:

#out {
width: 609px;/*The width here is an odd number, and the bug appears! ! Change it to an even number and it will be OK*/
height: 300px;
position: relative;
background:#FF0000;
color:#FFF;
}
#inn {
width: 200px;
height: 250px;
position: absolute;
top: 0px;
right: 0px;
background:#000000;
}

XML/HTML code:


This is an internal absolutely positioned DIV

Please indicate that the reprint is from "[One of the Crazy Things in IE6] Odd Width and Height BUG in IE6"

Statement:
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