> > This is a known issue.
> > One way to fix this would be to use a CSS expression to get the computed
> > height of the parent, you could try this:
> >
> > * html .myAbsolutelyPositionedElement {
> > behavior: expression(
> >        (this.runtimeStyle.behavior="none") && (this.runtimeStyle.height =
> > (this.parentNode.offsetHeight/2) + "px"));
> > }
> >
> >
> > Do *not* replace the "* html" hack with the "_property" hack here, because
> > IE7 would get that expression too.

> You always seem to come through for me with an answer! Thanks.

You're welcome

> This almost works. The main catch with it is that it's calculating the
> height of the parent based on the content contained, whether the
> content is hidden or not. These containers are going to have to be
> flexible in height for both hidden (and toggled) content as well as
> loading new content in via ajax.

What I posted is a "one-time" expression, to avoid performance cost, but if you 
do not care about that then you can try this instead:

* html .myAbsolutelyPositionedElement {
height: expression((this.parentNode.offsetHeight/2) + "px");
}

Be aware that in this case it will be almost constantly evaluated, so a pure 
javascript solution may be a better idea, but that's off-topic.


--
Regards,
Thierry | www.tjkdesign.com




______________________________________________________________________
css-discuss [cs...@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to