Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 11 of 11
  1. #1
    Regular Coder
    Join Date
    Nov 2002
    Location
    India
    Posts
    159
    Thanks
    0
    Thanked 0 Times in 0 Posts

    equivalent of cellspacing in css

    how could i set the cellspacing in css?

  • #2
    jkd
    jkd is offline
    Senior Coder jkd's Avatar
    Join Date
    May 2002
    Location
    metro DC
    Posts
    3,163
    Thanks
    1
    Thanked 18 Times in 18 Posts
    td {
    margin: 5px;
    }

  • #3
    Regular Coder
    Join Date
    Jul 2002
    Posts
    128
    Thanks
    0
    Thanked 0 Times in 0 Posts

    and border-spacing ?

    I get no difference with a margin on TD

    AND what about

    #anyT
    {
    color:#000066;
    background-color:#ffffff;
    width:80%;
    border-collapse:separate;
    border-spacing:6px;
    border:none;
    margin:auto;
    }

    ?

  • #4
    Senior Coder
    Join Date
    Jun 2002
    Location
    ColoRockyz
    Posts
    1,646
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Try padding:

    td {padding:5}

    What's all that stuff in there about the border if there isn't any? A demo to show what you've tried?
    Last edited by zoobie; 12-01-2002 at 09:14 PM.
    Zoobie or not Zoobie...That is the problem.
    <body onUnload="flush( ! )">

  • #5
    Regular Coder
    Join Date
    Nov 2002
    Location
    India
    Posts
    159
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Padding is fine, but I would like to set the cell-spacing using CSS. border-spacing does not work in IE thought it worked in Opera

  • #6
    Senior Coder joh6nn's Avatar
    Join Date
    Jun 2002
    Location
    72° W. 48' 57" , 41° N. 32' 04"
    Posts
    1,887
    Thanks
    0
    Thanked 1 Time in 1 Post
    as far as i know, cell spacing would be margins, and cellpadding would be padding. if it's not working, then there's something else going on, and we need to see the rest of the page.

    mozilla might let you, and ie 6 might let you, (i don't know if either actually do. hence the might) but technically, i'm not sure it's correct, to be able to assign cellspacing to one cell only. i bring this up, because i note that in the code you've posted, you're using an id. that could be your problem.

    i'm sure that jkd or someone else knows for sure, though.
    bluemood | devedge | devmo | MS Dev Library | WebMonkey | the Guide

    i am a loser geek, crazy with an evil streak,
    yes i do believe there is a violent thing inside of me.

  • #7
    Regular Coder
    Join Date
    Nov 2002
    Posts
    672
    Thanks
    1
    Thanked 1 Time in 1 Post

    Tables and CSS

    Is there a CSS equivalent for colspan and rowspan? It really eats up the page size and loading times on pages with big tables.

    I like foxes...

  • #8
    New Coder
    Join Date
    Dec 2002
    Location
    Florida
    Posts
    68
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hey Tails,

    If you're going to use CSS for rowspan/colspan, you may as well go the whole hog and convert to positioned <div> and get rid of those tables!

    Anyway, no I don't think so, in answer to your question.

    MrDoubtFire

  • #9
    Regular Coder
    Join Date
    Nov 2002
    Posts
    672
    Thanks
    1
    Thanked 1 Time in 1 Post

    Tables and CSS

    Well, thanks anyway. I use a lot of tables on my site. It's http://XFox_Prower.tripod.com. I made it in notepad and ms-edit. It started out on a dos computer. There is a dos browser that even implements css to some degree.

  • #10
    Regular Coder
    Join Date
    Oct 2002
    Posts
    380
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Be careful of IE's dodgy implementation of the box model (here's a page about that). It will give you different results with borders and padding in IE and w3c compliant browsers.

  • #11
    Regular Coder
    Join Date
    Nov 2002
    Posts
    672
    Thanks
    1
    Thanked 1 Time in 1 Post
    Hmm, I'm not sure what you meant. I did have to play around with the width values though. On my site, the tables should resize properly so the background doesn't overflow and repeat. But a series of cells containing images of fixed width don't add up right sometimes. For example, on a table with no cellspacing or cellpadding, 3 table cells on the same line each containing a 200x40 image should make or work properly in a table of 600 pixel width. Maybe it's the browsers.


  •  

    Posting Permissions

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