IE6 expressions: getting a parent element's height
Let's say I have this markup:
<div class="foobar">
<div style="height:expression(this.parent.style.height + 'px')"></div>
</div>
My expression doesn't work, but you can probably tell what I'm trying to do by it: get the height of the parent element.
Please, if you cannot answer the question do not bother r开发者_Python百科eplying. This is for a VERY, VERY specific bug that only affects IE. Either an expression must be used, or the bug cannot be fixed.
<div class="foobar">
<div style="height:expression(this.parentNode.offsetHeight + 'px')">test</div>
</div>
Inherit the height of the parent:
<div class="foobar">
<div style="height:inherit;"></div>
</div>
精彩评论