Monday, March 7, 2011

Scale div vertically until all content is shown?

I have a div with a set height of 200, and sometimes there's enough content inside to have to scroll. Is there any way to be able to scale/grow the div until there's no overflow in Scriptaculous?

Edit: I looked at the wiki, especially at Effect.Scale (which seems like the one I want) but I couldn't find a way to do what I'd like.

From stackoverflow
  • Use CSS?

    /*In non-IE css:*/
    .myclass {
    min-height: 270px;
    }
    
    /*In css for IE:*/
    .myclass {
    height: expression(this.scrollHeight < 270? "270px" : "auto" );
    }
    

0 comments:

Post a Comment