- Because they may still hold visible child nodes:
.no-height {
height: 0;
};
.absolute {
position: absolute;
}
<div class="no-height">
<p class="absolute">still here</p>
</div>
- Because they still can have borders or margins which could be visible
.no-height {
height: 0;
border: 5px solid;
margin: 120px;
};
<div class="no-height">
</div>
I should be at top
- Because they could have some influence on other visible nodes:
.no-height {
height: 0;
};
<div>
some inline<div class="no-height"></div>text
</div>
- …