IE7 Table Width

I had a problem with IE7 not respecting TD width. For example, I would do something like this:

<td style="width: 20px"></td>

But IE7 would completely ignore the width in favor of showing even columns.

This was extremely frustrating, and it had nothing to do with my CSS because it worked fine in Firefox.

Finally I found this property

table-layout: fixed;

Which made Internet Explorer behave as it should. I can finally specify the width of my table columns. I hope it helps.

  • Ed Schofield

    This helped me — thanks!

  • Thanks for this! It’s going to be a massive help.

  • Thanks! This finally fixed my problem.

  • Dan

    Thanks! Helped me out too :-)

  • Matt

    thanks boss.helped a rastaman out

  • TODD

    very good,thanks

  • Oh my god, this really helps me out
    thank you dude,thank you so much

  • Pingback: IE7 ignoring table cell widths | CSS Hints()

  • wwiii

    Awesome tip! Worked for me THANKS!

  • X-Bit

    Thanks alot! I searched for a solution for days now… you are great :)

  • Aaron R.

    Made my day! :D

  • Thaaaaaaaaaank you.

  • Thank you very much sir. You have saved my sanity.

  • Yohannes

    You’re awesome thanks a lot.. fixed the issue with IE7..

  • Stephen

    THANK YOU THANK YOU!!!!!!!! You made my day!

  • Zac

    You saved my arse! Thanks!

  • Donnie

    Thanks! This fixed a problem I was trying to work out for days.

  • Vinay

    Thanks you.. :) Its solved my problem.

  • Zoe

    Thank you so much – this was driving me absolutely crazy and your tip fixed it!


    Nice one! dont know how I could have not needed this before.

  • h00d

    Thanks man. Saved me a lot of time and frustration..

  • Legend

    Yay, what a PIA until i found your tip thx heaps

  • LadyCiani

    Love it, thank you. Solved a big headache for me.

  • Holy WOW – thanks. Tried a billion different things and finally one that worked!!

  • Rohan

    Cannot thank you enough for this tip….Thank You Very Much…….

  • Hell yeah! Thanks. 10x

  • Dimos

    Finally, the solution!


    omg, THANK YOU. This fixed the last hurdle of a a simple problem i’ve spent 3 trying to solve in ie7, percentage-wide table columns with padding and text-wrapping which when applied, does not add any pixels to width. It’s perfect now, thanks!! Without this, it would have been impossible!

  • thanks a lot!

  • +1 person helped and relieved! Thanks!

  • Thanks alot… this one fixed my problem…

  • Chidambar

    thanks a hell lot

  • Stormcrow85

    Cant thank you enought for this

  • Nico

    Yeaaaaaaaaaaaaahhhh ! Good job man! :) :) :)

  • Dinesh


  • !!

  • Jamin Day

    This just saved me hours of work. Thank you!!

  • Titosust

    Man! You just saved my day!!!
    nice hacks for fucking IE…
    can anyone write a worm/virus who will depart IE from earth?
    it’s nightmare for web developer like me.

  • Csearel

    This has been driving me absolutely CRAZY. Thank you so much Vinh!
    Chris (Tunbridge Wells, UK)

  • Grabowski

    You’ve just saved my brain from the explosion. Thank you so much!!!

  • Dgodla

    Thanks sooo much… I was going crazy over this!

  • Lucille Kenney

    OMG … drove me nuts! Thank you!

  • Dude.. That was soooo easy! Thanks. Been pulling my hair out for ages trying to get this table to look right in I.E!

  • Forgot about this one.  Nice little gem.  Saved me an extended headache.

    Thanks for posting.

  • Sure

    simply fixed! :) thank you!

  • Sergio

    solved my problem with this hint. thank you.

  • Saved my life. Thanks.

  • Kfesopfes

    You can also set width using percentages, like
    style=”width: 10%”
    (if you don’t like fixed table-layout )

  • Guest

    THANK GOD. I have been pulling my hair out over this! :)

  • thank you so much!!!

  • Santiago Berte

    You still saving lives… Thank you!!

  • Steven

    you are a god my friend. May I not be the last IE-weary traveler to find balm on this page

  • God bless you. Abundantly.. :)

  • Mark

    Thanks man, the fix works fine :D

  • Just wanted to say “thank you” – I stumbled upon your post while googling for this issue. 
    I’m well aware of IE7’s quirks and it’s hard to believe I hadn’t encountered this one until yesterday. 

  • Denise

    Thank you so much! It worked for me! 

  • hasan

    Thanks alotttttttttttt, fixed my problem.

  • John Waivers

    The only problem I can see with this is that it doesn’t work in any way whatsoever.

  • Thank you!!!

  • Thank you so much~

  • eric

    Thanks Man. This end my frustration with IE.

  • Pingback: IE Table fixed width « Eric Hariyanto Wijaya()

  • Trung

    This was immensely helpful! You’ve saved from pulling out the remainder of my hair. Much appreciated!