CSS question...

Discussion in 'HTML' started by Kian, Jul 25, 2003.

  1. Kian

    Kian Guest

    Hi there,

    I would like to transfer my table's style to CSS. The table is as below...

    < Table WIDTH="100%" CELLPADDING="4" CELLSPACING="0" BORDER="0">

    Can somebody here show me how to use CELLSPACING style in CSS?

    table.Outer
    {
    width: 100%; /*WIDTH="100%"*/
    padding: 4;/*CELLPADDING="4"*/
    ???????? /*CELLSPACING="0"*/
    border: 0;/*BORDER="0">*/
    }

    Thanks,
    Kian


    222
     
    Kian, Jul 25, 2003
    #1
    1. Advertising

  2. Kian

    rf Guest

    "Kian" <> wrote in message
    news:Ca1Ua.74386$...
    > Hi there,
    >
    > I would like to transfer my table's style to CSS. The table is as below...


    Moving to CSS usually implies abandoning tables for layout totally.

    > < Table WIDTH="100%" CELLPADDING="4" CELLSPACING="0" BORDER="0">
    >
    > Can somebody here show me how to use CELLSPACING style in CSS?


    If you really want to use tables then then

    table
    {
    border-spacing: whatever;
    ....
    }

    is the CSS substitute for cellspacing, however this is not suported by IE.

    Cheers
    Richard.
     
    rf, Jul 25, 2003
    #2
    1. Advertising

  3. Kian

    Steve Pugh Guest

    "Kian" <> wrote:

    >I would like to transfer my table's style to CSS. The table is as below...
    >
    >< Table WIDTH="100%" CELLPADDING="4" CELLSPACING="0" BORDER="0">
    >
    >Can somebody here show me how to use CELLSPACING style in CSS?
    >
    >table.Outer
    >{
    > width: 100%; /*WIDTH="100%"*/
    > padding: 4;/*CELLPADDING="4"*/
    >???????? /*CELLSPACING="0"*/
    > border: 0;/*BORDER="0">*/
    > }


    table.Outer {
    width: 100%;
    border: none;
    border-spacing: 0
    border-collapse: collapse;
    }

    table.Outer td, table.Outer th {
    padding: 4px;
    }

    The border-collapse shouln't be required, but IE doesn't support
    border-spacing so a workaround is needed.

    Steve

    --
    "My theories appal you, my heresies outrage you,
    I never answer letters and you don't like my tie." - The Doctor

    Steve Pugh <> <http://steve.pugh.net/>
     
    Steve Pugh, Jul 25, 2003
    #3
    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. Eric
    Replies:
    4
    Views:
    781
    clintonG
    Dec 24, 2004
  2. tom watson

    print.css and screen.css

    tom watson, Sep 9, 2003, in forum: HTML
    Replies:
    1
    Views:
    496
    Jukka K. Korpela
    Sep 9, 2003
  3. Replies:
    6
    Views:
    585
    Jonathan N. Little
    Mar 18, 2006
  4. AF
    Replies:
    17
    Views:
    628
    Nije Nego
    Aug 9, 2006
  5. richard
    Replies:
    12
    Views:
    785
    dorayme
    Mar 9, 2010
Loading...

Share This Page