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!

  • http://www.jmorobinson.co.uk John Robinson

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

  • http://www.yappler.com/ Michael Khalili

    Thanks! This finally fixed my problem.

  • Dan

    Thanks! Helped me out too :-)

  • Matt

    thanks boss.helped a rastaman out

  • TODD

    very good,thanks

  • http://o-f-p-s-v-r.cn P.S.V.R

    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

  • http://www.urbanbricks.com Urban B.

    Thaaaaaaaaaank you.

  • http://rickels.co.uk Chris

    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!

  • KORPZ

    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.

  • http://brian-kayser.blogspot.com Brian

    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…….

  • http://www.facebook.com/mihail.ilinov Mihail Ilinov

    Hell yeah! Thanks. 10x

  • Dimos

    Finally, the solution!

  • THANKYOU

    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!

  • http://www.facebook.com/people/Yunmi-Park/100000065547396 Yunmi Park

    thanks a lot!

  • http://workingconcept.com Matt

    +1 person helped and relieved! Thanks!

  • http://profiles.google.com/sharao111 Srinivas Rao Gunja

    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

    good

  • http://www.facebook.com/people/Тимур-Радченко/100000143600250 Тимур Радченко

    !!

  • 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!

  • http://showerchairs.co showerbuddy

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

  • http://www.slothjockey.com/blog/evilmammoth Evil Mammoth

    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.

  • http://nicooprat.com/ Nico

    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! :)

  • http://twitter.com/mingsss Minhee Choi

    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

  • http://www.joesteeve.org/ Joe Steeve

    God bless you. Abundantly.. :)

  • Mark

    Thanks man, the fix works fine :D

  • http://diniscorreia.com Dinis Correia

    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.

  • http://comicsinc.com/ Bill Crabb

    Thank you!!!

  • http://twitter.com/toonitw J-Hong, AHN

    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!