Raekye
Raekye

Reputation: 5131

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 and 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).

Upvotes: 1

Views: 4156

Answers (1)

Will
Will

Reputation: 20245

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

http://jsfiddle.net/ELpS8/1/

Upvotes: 2

Related Questions