How to Set 1px Div Height on Ie

I just want a div which has a height of 1 pixel, with background color that will act as a separator. But IE6 seems not to understand this simple tag:

.className { height: 1px; padding; border-bottom: 1px solid #e8e8e8; }

I tried several other tags like: line-height: 1px, overflow: none... But none work :-).

Luckily, I discover that putting an empty comment inside the div tag will do the trick. Which is:


<div><!-- --></div>


IE6 is such a pain :-). I keep on wondering why too many users still use this browser.

0 Comments

Post a Comment

Post a Comment (0)

Previous Post Next Post
NERV Open Source
Building production Spring Boot systems?

Explore NERV — open-source Java libraries for audit trails, persistence, exception handling, and reliable event-driven architecture.