#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2002
    Posts
    9
    Rep Power
    0

    Whats the CSS equivalent of "cellspacing"


    I had this table on my site:
    Code:
    <table border=0 width=750 cellpadding=0 cellspacing=0">
    I want to change it to CSS:
    Code:
    <table class="maintable">
    I'm using
    Code:
    border: 0;
    width: 750px;
    in my CSS file, what must I do to get the cellpadding and spacing to zero?
  2. #2
  3. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2001
    Posts
    333
    Rep Power
    16
    CSS2 Has a table property called border-spacing which is the equivalent of the table attribute cellspacing. There's just one itty bitty problem: None of the major browers supports this property. That doesn't mean it won't work, it might, I haven't tried it but, I've seen things work in IE that weren't supposed to.

    for more info:
    http://www.w3schools.com/css/css_reference.asp#table
    Last edited by Tundra; July 29th, 2002 at 07:00 PM.
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2002
    Location
    new york
    Posts
    84
    Rep Power
    13
    for cellpadding it's:

    padding:

    you can also control the four sides individually with:


    padding-top:
    padding-bottom:
    padding-right:
    padding-left:

    =============
    justin_dago
    =============
  6. #4
  7. No Profile Picture
    Senior Citizen
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Jan 2001
    Location
    leftcoast
    Posts
    2,019
    Rep Power
    16
    People love to argue about this kind of thing...

    http://www.evolt.org/article/CSS_Tab...ward/17/17798/
  8. #5
  9. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2001
    Posts
    333
    Rep Power
    16
    Yeah, the general rule is, it doesn't work everywhere. So don't count on it.

IMN logo majestic logo threadwatch logo seochat tools logo