The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Animating textarea

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #254657

    I tried to use jQuery slide() on a textarea element and it looked glitchy/janky so I tried to animate max-height. For some reason applying max-height: 0 !important reduces the height of the element but doesn’t bring it down to 0 – you can still see some of it.
    I’ve removed the rows= attribute from the HTML on the element but the jQuery slide effect still looks really bad.



    Just put display:none on textarea, because calculations of height are done by jquery, and on textarea call slide or slideToggle (see difference on following api link) function from jquery. That should do job for you.

    jquery api documentation – great site for showing jquerys capabilities.


    Why not use CSS transforms? Can we see a reduced Codepen demo?

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘CSS’ is closed to new topics and replies.