Hi,
Is it possible to use expressions in CSS with if/else statements?
I am trying to dynamically resize and iframe using the following CSS:
<style>
iframe {height:expression(if(document.readyState=='comple te')frames("myIframe").document.body.scrollHeight+ 25);}
</style>
This code waits until the iframe src page to load before calculating
the height. This solves some problems that come up when it tries to
calculate the hieght on a partially loaded src. Anyway, this works
okay, but when pages take a long time to load, only a fraction of the
page is displayed until it is completely loaded. Is there any way to
put the following code in an expression?
if (document.readyState=='complete') {
frames("winPanel").document.body.scrollHeight+25);
} else {
5000;
}
Basically, the problem is that CSS interprets the characters ;, {, and
} as CSS notation, so I don't know if I can use these characters in an
expression. Is there any way to solve this?
Thanks,
Jim