I have a table that displays fine in Safari, Firefox and IE8 but it's width is jumping to something in the range of 1500px in IE7, while it should be 250px.

I've tried setting the width of the table, thead, individual th's and columns but with no luck. Is there some sort of bug to styling the width of tables in IE7 and if so what can I do to get around it?

(The web page screenshot is on GoDaddy's preview dns service so sorry about the ads!)

3 answers

danwellman 5600

You have a series of JS errors on the page, while these don't stop the page rendering in IE, it does seem to stop the Developer Tools from working...

Have you tried setting display:block on the table?

Also try setting cellspacing="0" as an attribute on the table element.

Failing that, try enclosing the table in a <div> with the required width set on it

Answered about 10 years ago by danwellman

You could try setting max-width: 250px; on the table. Perhaps try it without the negative margins?

It's quite hard to debug with all the javascript errors though.

Answered about 10 years ago by Olly Hodgson

Turns out I needed to set the width on the p element within in the th sections.

Dan and Olly thanks for helping though =)

Answered about 10 years ago by George Hickman