Using flexbox to control the layout of a table works in webkit browsers but in Firefox, Demonstrat
I believe the issue involves the default If you override it with Make the following adjustments: Revised Codepen My first thought was to make sure each EDIT The solution above stands. This edit pertains to the explanation. On examination of the spec, it appears that flex items don't even have a default In this case, it seems that having to declare s only render as wide as their own content.
display
value of your flex items.display: flex
the layout should work as intended across browsers.td:first-child { display: flex; }
td:nth-child(2) { display: flex; }
td:nth-child(3) { display: flex; }
td
had the proper display
value applied – something along the lines of display: flex-item
. However, flex-item
doesn't exist, so I used display: flex
.
display
value. Basically, once you make the parent a flex container, the children become flex items, and accept flex properties, regardless of any display
rule applied. Hence, a default display
rule is not necessary.display: flex
on the flex items is a quirk necessary to get Firefox and IE to work.