padding problem..

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • maya

    padding problem..

    hi,

    I discovered recently, the hard way, that adding padding-right or
    padding-left to a <tdadds to the width of <td>!!

    so how do I add left- or right-padding to a <tdwithout adding to the
    width of it (short of putting a div inside each <tdand making it a
    specific width?)

    what's the point of "padding" property if instead of adding just the
    specified padding it WIDENS element you're applying padding to????? :(

    thank you...
  • C A Upsdell

    #2
    Re: padding problem..

    maya wrote:
    hi,
    >
    I discovered recently, the hard way, that adding padding-right or
    padding-left to a <tdadds to the width of <td>!!
    Yes, that's what it is supposed to do. Per the standards.
    so how do I add left- or right-padding to a <tdwithout adding to the
    width of it (short of putting a div inside each <tdand making it a
    specific width?)
    I'm not sure what you are trying to do, but my guess is that you want to
    increase the space between the cells without increasing the size of the
    block which is affected by the background colour, background image, etc.

    To do this you can specify (or increase) the TD's margin.

    HTH

    Comment

    • Jeff

      #3
      Re: padding problem..

      maya wrote:
      hi,
      >
      I discovered recently, the hard way, that adding padding-right or
      padding-left to a <tdadds to the width of <td>!!
      This sounds like a box model issue. I'm not sure this applies to
      tables cells but it does to other boxes.

      Try taking this out of standards mode and see if that "fixes" your
      problem. There is a CSS box setting but I don't believe it is widely
      supported.

      Others should come along and correct this. I'm not feeling well
      today, so I did not verify this

      Jeff
      >
      so how do I add left- or right-padding to a <tdwithout adding to the
      width of it (short of putting a div inside each <tdand making it a
      specific width?)
      >
      what's the point of "padding" property if instead of adding just the
      specified padding it WIDENS element you're applying padding to????? :(
      >
      thank you...

      Comment

      Working...