Flexbox does not vertically center div inside table cell
css, flexbox, html
Solution
When you change the `display` value of a table cell from `table-cell` to `flex`, it appears to mess up the table algorithm.
But to vertically center the content of a table-cell, you just need `vertical-align: middle`. (It's one of those rare instances when this stubborn property actually works – on table-cell and inline elements.)
http://codepen.io/anon/pen/wddVPy?editors=1000
Problem
Why is the red div not centered vertically? My pen: http://codepen.io/helloworld/pen/aWWgBK?editors=1000 ``` <table style="border:1px solid black" class="table"> <thead> <th>selected</th> <th>Name</th> </thead> <tbody> <tr> <td class="align-middle"><input type="checkbox"></td> <td style="display: flex; align-items: center;"> <div style="background:red;"> this text should be vertically aligned in the center of the table cell </div> </td> <td class="align-middle"> <div class="btn-group"> <button class="btn btn-primary">Speichern</button> <button type="button" class="btn btn-secondary">Abbrechen</button> </div> </td> <td> <ul> <li>item 1</li> <li>item 2</li> <li>item 3</li> <li>item 4</li> <li>item 5</li> <li>item 6</li> </ul> </td> </tr> </tbody> </table> ```