CSS equiv for cellspacing & cellpadding

Discussion in 'HTML' started by Todd Cary, Sep 16, 2004.

  1. Todd Cary

    Todd Cary Guest

    I have not been able to find the CSS equivalents to the table properties

    cellspacing
    cellpadding

    I tried using

    Table {
    border-color: #FFFFFF;
    background-color: #FFFFFF;
    width: 100%;
    border: 0;
    padding: 0;
    margin: 0;
    }

    but I still get spacing.

    Todd
    Todd Cary, Sep 16, 2004
    #1
    1. Advertising

  2. On Thu, 16 Sep 2004 17:58:27 +0000, Todd Cary wrote:

    > I have not been able to find the CSS equivalents to the table properties
    >
    > cellspacing
    > cellpadding
    >
    > I tried using
    >
    > Table {
    > border-color: #FFFFFF;
    > background-color: #FFFFFF;
    > width: 100%;
    > border: 0;
    > padding: 0;
    > margin: 0;
    > }
    > }
    > but I still get spacing.
    >
    > Todd


    Try

    padding:0px;

    I think that will help. But it might not.
    --
    Jeffrey D. Silverman | **
    Website | http://www.newtnotes.com

    (** Drop "pants" to reply by email)
    Jeffrey Silverman, Sep 16, 2004
    #2
    1. Advertising

  3. Todd Cary

    oo- Guest

    "Todd Cary" <> wrote in message
    news:7vk2d.14029$...
    >I have not been able to find the CSS equivalents to the table properties
    >
    > cellspacing
    > cellpadding
    >
    > I tried using
    >
    > Table {
    > border-color: #FFFFFF;
    > background-color: #FFFFFF;
    > width: 100%;
    > border: 0;
    > padding: 0;
    > margin: 0;
    > }
    >
    > but I still get spacing.
    >
    > Todd



    try

    table{
    border-collapse: collapse;
    }

    yopu may have to apply this to the tds and ths e.g.

    th, td{
    border-collapse: collapse;
    margin: 0;
    }

    i think there is also a border-spacing attribute for which you can assign
    the value of 0 or none but I'm not sure of its effectiveness.

    Phil
    oo-, Sep 16, 2004
    #3
  4. Todd Cary

    Todd Cary Guest

    Phil -

    border-collapse: collapse;

    That took care of part of the problem.

    I have not been able to find the CSS equivalent of table property,
    cellpadding.

    I went through www.blooberry.com, no definitive answers. I'll just
    leave the property in place for the time being.

    Todd

    oo- wrote:
    > "Todd Cary" <> wrote in message
    > news:7vk2d.14029$...
    >
    >>I have not been able to find the CSS equivalents to the table properties
    >>
    >>cellspacing
    >>cellpadding
    >>
    >>I tried using
    >>
    >>Table {
    >> border-color: #FFFFFF;
    >> background-color: #FFFFFF;
    >> width: 100%;
    >> border: 0;
    >> padding: 0;
    >> margin: 0;
    >>}
    >>
    >>but I still get spacing.
    >>
    >>Todd

    >
    >
    >
    > try
    >
    > table{
    > border-collapse: collapse;
    > }
    >
    > yopu may have to apply this to the tds and ths e.g.
    >
    > th, td{
    > border-collapse: collapse;
    > margin: 0;
    > }
    >
    > i think there is also a border-spacing attribute for which you can assign
    > the value of 0 or none but I'm not sure of its effectiveness.
    >
    > Phil
    >
    >
    Todd Cary, Sep 16, 2004
    #4
  5. Todd Cary

    kchayka Guest

    Todd Cary wrote:
    >
    > I have not been able to find the CSS equivalent of table property,
    > cellpadding.


    What's wrong with just using padding?
    td {padding: .3em}

    --
    Reply email address is a bottomless spam bucket.
    Please reply to the group so everyone can share.
    kchayka, Sep 17, 2004
    #5
  6. Todd Cary

    Sam Hughes Guest

    kchayka <> wrote in news::

    > Todd Cary wrote:
    >>
    >> I have not been able to find the CSS equivalent of table property,
    >> cellpadding.

    >
    > What's wrong with just using padding?
    > td {padding: .3em}


    Why, that would be too easy and too correct!
    Sam Hughes, Sep 17, 2004
    #6
  7. Todd Cary

    Todd Cary Guest

    I tried

    padding: 0;

    However, the fine line still exists. If I put the property

    padding="0"

    in the table tag, the fine line disappears.

    Todd

    kchayka wrote:
    > Todd Cary wrote:
    >
    >>I have not been able to find the CSS equivalent of table property,
    >>cellpadding.

    >
    >
    > What's wrong with just using padding?
    > td {padding: .3em}
    >
    Todd Cary, Sep 17, 2004
    #7
  8. Todd Cary

    Todd Cary Guest

    Sam -

    I tried

    padding: 0;

    also

    padding: 0px;

    However, the fine line still exists between two rows. If I put the property

    padding="0"

    in the table tag, the fine line disappears.

    Todd

    Sam Hughes wrote:

    > kchayka <> wrote in news::
    >
    >
    >>Todd Cary wrote:
    >>
    >>>I have not been able to find the CSS equivalent of table property,
    >>>cellpadding.

    >>
    >>What's wrong with just using padding?
    >>td {padding: .3em}

    >
    >
    > Why, that would be too easy and too correct!
    Todd Cary, Sep 17, 2004
    #8
  9. Todd Cary

    kchayka Guest

    Todd Cary wrote:
    >
    > kchayka wrote:
    >> Todd Cary wrote:
    >>
    >>>I have not been able to find the CSS equivalent of table property,
    >>>cellpadding.

    >>
    >> What's wrong with just using padding?
    >> td {padding: .3em}


    > I tried
    > padding: 0;
    >
    > However, the fine line still exists. If I put the property
    > padding="0"
    >
    > in the table tag, the fine line disappears.


    It sounds like you may be (ab)using layout tables. If you're not, why
    would anyone care about a pixel or two? If you *are* using layout
    tables, what do you hope to gain from defining things like cellpadding
    in CSS? Maybe it would clarify your situation if you posted a URL.

    And please don't top-post in this newsgroup. thanks for your cooperation.


    --
    Reply email address is a bottomless spam bucket.
    Please reply to the group so everyone can share.
    kchayka, Sep 18, 2004
    #9
  10. Todd Cary

    Todd Cary Guest

    kchayka wrote:
    > Todd Cary wrote:
    >
    >>kchayka wrote:
    >>
    >>>Todd Cary wrote:
    >>>
    >>>
    >>>>I have not been able to find the CSS equivalent of table property,
    >>>>cellpadding.
    >>>
    >>>What's wrong with just using padding?
    >>>td {padding: .3em}

    >
    >
    >>I tried
    >>padding: 0;
    >>
    >>However, the fine line still exists. If I put the property
    >>padding="0"
    >>
    >>in the table tag, the fine line disappears.

    >
    >
    > It sounds like you may be (ab)using layout tables. If you're not, why
    > would anyone care about a pixel or two? If you *are* using layout
    > tables, what do you hope to gain from defining things like cellpadding
    > in CSS? Maybe it would clarify your situation if you posted a URL.
    >
    > And please don't top-post in this newsgroup. thanks for your cooperation.
    >
    >


    Here are two versions for my client per their specs:

    With cellpadding="0" as a property

    http://209.204.172.137/nasd/php/login.php


    Without cellpdding="0" as a property, however the CSS contains
    {padding: 0px;}

    http://209.204.172.137/nasd/php/login_2.php
    Todd Cary, Sep 18, 2004
    #10
  11. Todd Cary

    rf Guest

    Todd Cary wrote:

    > http://209.204.172.137/nasd/php/login_2.php


    That page is a gross misuse of both tables and CSS. The tables are about
    three times as complex as the layout requires, even when using tables for
    layout purposes. The CSS is about 10 times too complex and verbose. I for
    one would never even attempt to troubleshoot it. Given the job as a paying
    proposition I would simply rewrite the page, probably saving the client some
    money in the process.

    If you were to write it from the ground up you would have far less chance of
    confusing the browser. You should expect the HTML file to be no longer than
    about 20 to 30 lines. The CSS should be at most three rules with no more
    than 10 properties mentioned between them.

    --
    Cheers
    Richard.
    rf, Sep 18, 2004
    #11
  12. Todd Cary

    Todd Cary Guest

    rf wrote:
    > Todd Cary wrote:
    >
    >
    >>http://209.204.172.137/nasd/php/login_2.php

    >
    >
    > That page is a gross misuse of both tables and CSS. The tables are about
    > three times as complex as the layout requires, even when using tables for
    > layout purposes. The CSS is about 10 times too complex and verbose. I for
    > one would never even attempt to troubleshoot it. Given the job as a paying
    > proposition I would simply rewrite the page, probably saving the client some
    > money in the process.
    >
    > If you were to write it from the ground up you would have far less chance of
    > confusing the browser. You should expect the HTML file to be no longer than
    > about 20 to 30 lines. The CSS should be at most three rules with no more
    > than 10 properties mentioned between them.
    >

    Your comments are greatly appreciated, and I am going to pass them onto
    my client. My client administers about 60-70% of the large class action
    lawsuits (e.g. Enron, Microsoft, Dow Chemical), and they like me to use
    their generic page layout ( http://209.204.172.137/generic/ ).

    I'll try to get them to modify their specs.

    Thank you again for taking the time.....

    Todd
    Ariste Software
    Petaluma, CA
    Todd Cary, Sep 18, 2004
    #12
  13. Todd Cary

    kchayka Guest

    Todd Cary wrote:

    > kchayka wrote:
    >>>> Todd Cary wrote:
    >>>>
    >>>>>I have not been able to find the CSS equivalent of table property,
    >>>>>cellpadding.

    >>
    >> Maybe it would clarify your situation if you posted a URL.

    >
    > http://209.204.172.137/nasd/php/login_2.php


    Yes, it's tag soup, full of ishy nested layout tables. I wouldn't even
    bother trying to "fix" this with CSS. I agree with rf, it needs to be
    rewritten altogether.

    --
    Reply email address is a bottomless spam bucket.
    Please reply to the group so everyone can share.
    kchayka, Sep 18, 2004
    #13
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. shank

    convert cellspacing to CSS

    shank, Jan 23, 2004, in forum: HTML
    Replies:
    8
    Views:
    22,346
    shank
    Jan 24, 2004
  2. Gnarlodious
    Replies:
    2
    Views:
    7,391
    Gnarlodious
    Apr 10, 2004
  3. Jan Faerber

    cellpadding - css

    Jan Faerber, Dec 7, 2004, in forum: HTML
    Replies:
    4
    Views:
    31,887
    Michael Fesser
    Dec 8, 2004
  4. =?UTF-8?B?TWFydGluIFDDtnBwaW5n?=

    cellspacing und cellpadding

    =?UTF-8?B?TWFydGluIFDDtnBwaW5n?=, Aug 13, 2005, in forum: HTML
    Replies:
    6
    Views:
    1,560
    =?ISO-8859-1?Q?Martin_P=F6pping?=
    Aug 14, 2005
  5. K.
    Replies:
    22
    Views:
    1,272
    Albert Wiersch
    Apr 20, 2007
Loading...

Share This Page