• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Same CSS rule for td width works for Firefox, but does not work for IE

 
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a table which have 3 columns. The first column is the holder for image (img tag), second column is always space ( ); and the third column is a text link.

I use this table to align the image and text link.

One weird thing is in some lines, td just wrap image well with no margins, no spacing and no padding. But for some other table lines, td is always 10 pixels wider than image width which causes the button alignment issue.

To solve this problem, i create a CSS rule as follow:

td { max-width:20px; width:20px}

20px is the width of the image. This rule works in FireFox3, but does not work for IE6.

Can anyone give me some clues about how to resolve the problem?

Thanks in advance
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
IE6 does not have max-width

set overflow to hidden

issue can be with whitespace, use web developer toolbar for IE to inspect the element.

Eric
 
reply
    Bookmark Topic Watch Topic
  • New Topic