bug in IE

Follow me for more content or contact for work opportunities:
Twitter / LinkedIn

It's known that Microsoft Internet Explorer usually shows pages in a different way than good web programmers expect. Luckily those differences diminish when using XHTML Strict and CSS, but sometimes we are surprised for some huge bugs.

This is the case when trying to create an empty layer, something like that:
our_style {
height: 1px;
width: 100px;
background-color: black;
}
[...]



Obviously we expect something like a horizontal line, but IE increases our layer height to 10px 18px or whatever...

This time there is a easy solution for solving the bug, that is just adding a zero font size for the layer:

our_style {
font-size: 0px
height: 1px;
width: 100px;
background-color: black;
}

Follow me for more content or contact for work opportunities:
Twitter / LinkedIn