The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Home › Forums › CSS › Can a table element be a flex item?
I’m struggling to get a table to participate in a flexbox. I can’t find anything that would seem to preclude tables from being flex items, but I can’t get any of the flex behavior to apply to a table. Simple example:
http://codepen.io/bjamieson/pen/bpgpQd
Tables have a default display property (display:table..duh) so you’d have to override that.
display:table
BUT…there is no display:flex-item but display:block should get the ball rolling.
display:flex-item
display:block
http://codepen.io/Paulie-D/pen/ZWLOGa
Unfortunately, you might still have issues with tr/td as they may have the same problems.
tr/td