2

Trying to make userface more userfriendly i want to implement following:

I have a table with some alert above it. Take a look at this example

When I close alert table 'jumps' to the top. I want it to slide smoothly. I want to use pure css. I've read about transition and animation but i think that's not what i need, or maybe i am wrong.

Any ideas? Thanks in advance!

user3673623
  • 1,795
  • 2
  • 12
  • 18

1 Answers1

-2

K, so you can do it with pure css. Bootstrap removes the in class from the alert at the beginning of the fade out. We can use that to apply css to the alert before it's removed from the page.

.fade {
    max-height: 400px;
    -webkit-transition: .3s;
        -ms-transition: .3s;
            transition: .3s;
}

.fade:not(.in) {
    max-height: 0;
}

See it in action: http://jsfiddle.net/McHUc/92/

AndrewHipp
  • 379
  • 2
  • 6
  • Added vendor prefixes which are needed for broader browser support. So it wouldn't work on most browsers. Updated sample code and fiddle. – AndrewHipp Aug 04 '15 at 18:43