Simon
Simon

Reputation: 23149

Bug with height attribute of position absolute div in IE6

When I try to run the following

<body>
<div style="width: 400px;height: 1px;background-color: red;position: absolute;bottom: 0;right: 0"></div>
</body>

It doesn't understand the height of my div in IE6 (also in 5.5).

Is this known bug? And how can I solve it?

Upvotes: 2

Views: 290

Answers (2)

wajiw
wajiw

Reputation: 12269

It won't create a height/width on it until there's something inside the div. Try adding &nbsp; (or any other text) inside the div to get it to adjust properly.

Upvotes: 2

meder omuraliev
meder omuraliev

Reputation: 186662

try font-size:0;line-height:0; as well

Upvotes: 1

Related Questions