Raekye Raekye - 1 year ago 102
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).

Answer Source

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


Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download