Raekye Raekye - 4 months ago 25
CSS Question

Make HTML table columns fixed width (and stretch to fit)

I'm trying to make a calendar, and I've got it mostly working except I want to space it out a bit. I tried setting the table to

width: 210px
table-layout: fixed
so it'd work like this, but I can't seem to get it worked. Here is the jsFiddle; when I set the width to 210px it just slides the table over. Fixed doesn't seem to do anything.

How can I set the column width to stretch to fit (and evenly spaced).


Try removing display: inline-block from the table#cal styling.