www.webdeveloper.com
Results 1 to 6 of 6

Thread: is there a replacement for cellpadding for IE?

  1. #1
    Join Date
    Dec 2004
    Posts
    439

    is there a replacement for cellpadding for IE?

    Hi. I want every td in my table to have no padding. Before this was accomplished using cellpadding, so im wondering if there is any css value that will do this so i have no padding in all my tds, thanks in advance.

  2. #2
    Join Date
    Oct 2005
    Location
    Gold Coast, Australia
    Posts
    2,115
    Try

    Code:
    td {
    	padding-top: 0px;
    	padding-right: 0px;
    	padding-bottom: 0px;
    	padding-left: 0px;
    }

  3. #3
    Join Date
    Aug 2004
    Location
    Ankh-Morpork
    Posts
    19,334
    Or, save yourself some typing:
    Code:
    td {
      padding: 0;
    }
    "Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
    ~ Terry Pratchett in Nation

    eBookworm.us

  4. #4
    Join Date
    Dec 2004
    Posts
    439
    thanks guys, actually both those examples aren't as good as this one

    .mytable {
    width:100%;
    }

    .mytable td {
    padding:5px; // <- affects padding in every and only mytable cells.
    }

  5. #5
    Join Date
    Aug 2004
    Location
    Ankh-Morpork
    Posts
    19,334
    affects padding in every and only mytable cells
    If that had been part of your originally stated requirement, then I would have given you that solution, but you just said, "all my tds."
    "Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
    ~ Terry Pratchett in Nation

    eBookworm.us

  6. #6
    Join Date
    Dec 2004
    Posts
    439
    "td in my table to have no padding" is not saying every td in my document!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles