views:

26

answers:

2

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 replying. This is for a VERY, VERY specific bug that only affects IE. Either an expression must be used, or the bug cannot be fixed.

A: 

Inherit the height of the parent:

<div class="foobar">
   <div style="height:inherit;"></div>
</div>
Sarfraz
That will only work if the `height` has been explicitly set on `foobar`
Scott
@Scott: That is assumed pretty much here and footers do have a height in most cases :) Let's see what OP has to say.
Sarfraz
+2  A: 
<div class="foobar">
   <div style="height:expression(this.parentNode.offsetHeight + 'px')">test</div>
</div>
Scott