Announcement

Collapse
No announcement yet.

CSS cell-spacing

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • CSS cell-spacing

    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
    margin: 1px; should do the trick. But you have to define it for the cells. It won't work, if you define it for the table-tag.
    Hints & Tips:
    [[vB3] More Spiders / Indexers / Archives for vB3 - list]|[List of one-time-emails to ban]


    http://sfx-images.mozilla.org/affili...efox_80x15.png

    Comment


    • #3
      Hi Zeeshan M

      If you are using xhtml then declaring a border for the cell and using the default value (in other words not declaring) for table-collapse on the table a gap is already created. Sample here:
      Table css
      Later
      Keith

      Webxpertz Community for Webmasters & Developers

      Comment

      Related Topics

      Collapse

      Working...
      X