Table Padding Troubles

Discussion in 'CSS' started by travoholic, Jan 13, 2008.

  1. #1
    Hello,

    I'm attempting to make a homepage that is the same as my Wordpress theme so am using the stylesheet that goes with it. It's unruly and most isn't necessary at all but I don't want to eliminate anything just yet in case I need it later.

    As you can guess my knowledge of CSS is poop. The main problem I'm having now is that my tables seem to have a cell padding (cell spacing?) of about 2 pixels. I've changed the bits I think I need to to 0 but am having no luck.

    Can someone take a look at my page http://www.wanderstruck.com/index2.htm and the stylesheet http://www.wanderstruck.com/style.css and let me know what I need to do to make it so there is no spacing between the cells of my tables or around the edges?

    Thanks!
    Kirsty
     
    travoholic, Jan 13, 2008 IP
  2. manishk

    manishk Peon

    Messages:
    63
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #2
    You can remove cellpadding and cellspacing (margin) from the tables using this:

    
    td{margin:0;padding:0}
    
    Code (markup):
    Don't use tables for layout.
     
    manishk, Jan 14, 2008 IP
  3. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,999
    Best Answers:
    253
    Trophy Points:
    515
    #3
    First off, WRONG - second, what he probably wants is to apply border-collapse:collapse;
     
    deathshadow, Jan 14, 2008 IP
  4. travoholic

    travoholic Well-Known Member

    Messages:
    299
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    108
    #4
    Ya ya ya, I know tables are a no no but I don't have time right now to learn CSS for layout. I'm doing my best learning it as I go but I don't want to bite off more than I can chew.

    I'll try bother of these but where should I put the code?

    THanks,
    Kirsty
     
    travoholic, Jan 14, 2008 IP
  5. manishk

    manishk Peon

    Messages:
    63
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Why is it wrong? You are right about the border-collapse
     
    manishk, Jan 14, 2008 IP