Looking for a JavaEE Architect or Potential Tech Co-Founder?
Please don't hesitate to contact me.

This article shows how a 1px div height on EI6 can be achieved.

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.
This article shows how a 1px div height on EI6 can be achieved. This article shows how a 1px div height on EI6 can be achieved. Reviewed by czetsuya on Saturday, March 28, 2009 Rating: 5

No comments:

Powered by Blogger.