W3C home > Mailing lists > Public > www-style@w3.org > November 2012

Re: animate/transition height to/from auto

From: Alan Gresley <alan@css-class.com>
Date: Thu, 22 Nov 2012 22:16:58 +1100
Message-ID: <50AE09AA.4070506@css-class.com>
To: Behrang Saeedzadeh <behrangsa@gmail.com>
CC: W3C CSS Mailing List <www-style@w3.org>
On 9/11/2012 11:46 AM, Behrang Saeedzadeh wrote:
> Hi all,
>
> Any plans to add this to the CSS spec? Right now, even with JS, it is not
> possible to do this elegantly.
>
> Cheers,
> Behrang Saeedzadeh
> http://www.behrang.org

Why not just use min-height?

<!DOCTYPE html>

<style type="text/css" media="screen">

div { background: skyblue; padding: 1em;  }

div:hover {
    -webkit-transition: all 2s linear;
     -moz-transition: all 2s linear;
     -o-transition: all 2s linear;
     -ms-transition: all 2s linear;
     transition: all 2s linear;
     min-height: 200px;
}

</style>

<div>Content</div>




-- 
Alan Gresley
http://css-3d.org/
http://css-class.com/
Received on Thursday, 22 November 2012 11:17:26 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:21:02 GMT