Forum Moderators: not2easy

Message Too Old, No Replies

CSS Expression help

         

ebby

1:59 pm on Jun 12, 2008 (gmt 0)

10+ Year Member



I'm using an expression to set a max-height fix for IE6. This is my code:

.commentpic
{
max-height: 50px;
max-width: 50px;
height: expression(
this.scrollHeight > 50 ? "50px": "auto"
); /* IE6 */
}

This works, however the browser crashes basically and the user gets "(Not Responding)" message. Any help would be greatly appreciated.

swa66

2:08 pm on Jun 12, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Try making the two numbers slightly different (Known bug they never bothered to fix)

While at it, please throw that expression where it belongs: in a conditional comment served on the the versions of IE that actually need it. [It's the only way to get rid of it and be able to have IE support proper standard CSS in their next version (or the one after it).

ebby

2:18 pm on Jun 12, 2008 (gmt 0)

10+ Year Member



Still not responding. Man, I have no idea here. Thanks for the effort though swa.