SitePoint Sponsor

User Tag List

Results 1 to 6 of 6

Thread: CSS cellspacing

  1. #1
    Free Geek computerages's Avatar
    Join Date
    Oct 2004
    Location
    /dev/null
    Posts
    1,071
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Smile CSS cellspacing

    Hello everyone!

    I am using CSS to define the style of HTML table...but I can't figure out how could I write cellspacing="1" in CSS.

    Here is the CSS code:

    Code:
    table table {border:1px solid #9ACC99; margin-left:10px; margin-right:10px; cell-spacing:1px; }
    table table td { border:1px solid #9ACC99; padding:3px; font-family:verdana; background-color:#EEF9F3; }
    table table th { padding:3px; background-color: #9ACC99; text-align:center; cursor:default; border:1px ridge #EEF9F3; font-family:verdana; }
    Thanks!!

  2. #2
    SitePoint Evangelist pip's Avatar
    Join Date
    Jun 2001
    Location
    Cape Town, South Africa
    Posts
    548
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Had a look at my references and quite honestly I don't think there is support for it. Rather bizarre is you ask me!
    - Pip
    ---------------------------------------------------------------------------------
    Nothing takes the taste out of peanut butter quite like unrequited love.

  3. #3
    SitePoint Wizard
    Join Date
    Mar 2001
    Posts
    3,537
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,

    I think everything in css is based on the box model, including <td>'s which have in order:content, padding, borders, and margins. Adjustments are made to one of those properties--figuring out which ones is the trick. See the thread "getting a border around borderless tables" where issues like yours are being discussed:

    http://www.sitepoint.com/forums/showthread.php?t=204765

  4. #4
    Caveat surfer Buddy Bradley's Avatar
    Join Date
    May 2003
    Location
    Cambridge, UK
    Posts
    2,366
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

  5. #5
    SitePoint Wizard
    Join Date
    Mar 2001
    Posts
    3,537
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Great link. I just saw it in the other thread, and came here to point it out. Thanks.

  6. #6
    ☆★☆★ silver trophy vgarcia's Avatar
    Join Date
    Jan 2002
    Location
    in transition
    Posts
    21,235
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by computerages
    Hello everyone!

    I am using CSS to define the style of HTML table...but I can't figure out how could I write cellspacing="1" in CSS.
    I'm pretty sure that "cellspacing=1" is the default status for a table in nearly every browser out there.


Bookmarks

Posting Permissions

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