cellpadding - css

Discussion in 'HTML' started by Jan Faerber, Dec 7, 2004.

  1. Jan Faerber

    Jan Faerber Guest

    why is <table cellpadding="0"> and <table style="cellpadding:0;"> not the
    same? There is a little 1px margin with css between the table border and an
    image. Are there more such differences?




    --
    Jan

    http://linux.janfaerber.com
     
    Jan Faerber, Dec 7, 2004
    #1
    1. Advertising

  2. Jan Faerber

    rf Guest

    Jan Faerber wrote:

    > why is <table cellpadding="0"> and <table style="cellpadding:0;"> not the
    > same?


    Possibly because there is no such CSS property as cellpadding.
    You should look at the table bit of the recommendation:

    http://www.w3.org/TR/REC-CSS2/tables.html

    --
    Cheers
    Richard.
     
    rf, Dec 7, 2004
    #2
    1. Advertising

  3. Jan Faerber

    Sid Ismail Guest

    On Tue, 07 Dec 2004 12:22:54 GMT, Jan Faerber
    <jancfaerber_spider@monkey_hotmail.com> wrote:

    : why is <table cellpadding="0"> and <table style="cellpadding:0;"> not the
    : same? There is a little 1px margin with css between the table border and an
    : image. Are there more such differences?


    Whatever you put into the quotes when using "styles" must conform to the CSS
    specifications. cellpadding isn't one of them, but padding is. BTW, do you
    want to set the padding for the table or the td's??

    http://www.w3schools.com/css/css_reference.asp

    Sid
     
    Sid Ismail, Dec 7, 2004
    #3
  4. Jan Faerber

    Jan Faerber Guest

    Sid Ismail wrote:

    > On Tue, 07 Dec 2004 12:22:54 GMT, Jan Faerber
    > <jancfaerber_spider@monkey_hotmail.com> wrote:
    >
    > : why is <table cellpadding="0"> and <table style="cellpadding:0;"> not
    > : the same? There is a little 1px margin with css between the table border
    > : and an image. Are there more such differences?
    >
    >
    > Whatever you put into the quotes when using "styles" must conform to the
    > CSS
    > specifications. cellpadding isn't one of them, but padding is. BTW, do
    > you want to set the padding for the table or the td's??
    >
    > http://www.w3schools.com/css/css_reference.asp
    >
    > Sid


    When I was transforming the file from the posing 'Controlling the height of
    a div?' you have a banner on the top. So you need one big table with one
    <td>, an inner-table in that <td> - I found that element now on
    http://www.w3.org/TR/REC-CSS2/tables.html - for that inner table a <tr> and
    a <td><img src=...">. The surounding table must not have a gap between its
    double border and the pic. So I got a lot to read ... thx ... but I have to
    go now.




    --
    Jan

    http://linux.janfaerber.com
     
    Jan Faerber, Dec 7, 2004
    #4
  5. .oO(Jan Faerber)

    >why is <table cellpadding="0"> and <table style="cellpadding:0;"> not the
    >same?


    There's no such property in CSS.

    >There is a little 1px margin with css between the table border and an
    >image. Are there more such differences?


    HTML:

    <table cellspacing="0" cellpadding="0">

    The same with CSS:

    table {border-spacing: 0}
    table td {padding: 0}

    Micha
     
    Michael Fesser, Dec 8, 2004
    #5
    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. Lorne Cameron

    Unwanted cellpadding in IE6 tables?

    Lorne Cameron, Jun 26, 2003, in forum: HTML
    Replies:
    9
    Views:
    1,955
    Jacqui or (maybe) Pete
    Jun 27, 2003
  2. Gnarlodious
    Replies:
    2
    Views:
    7,403
    Gnarlodious
    Apr 10, 2004
  3. Todd Cary
    Replies:
    12
    Views:
    10,517
    kchayka
    Sep 18, 2004
  4. =?UTF-8?B?TWFydGluIFDDtnBwaW5n?=

    cellspacing und cellpadding

    =?UTF-8?B?TWFydGluIFDDtnBwaW5n?=, Aug 13, 2005, in forum: HTML
    Replies:
    6
    Views:
    1,575
    =?ISO-8859-1?Q?Martin_P=F6pping?=
    Aug 14, 2005
  5. Uriah Piddle

    CellPadding

    Uriah Piddle, Mar 8, 2007, in forum: ASP .Net
    Replies:
    0
    Views:
    421
    Uriah Piddle
    Mar 8, 2007
Loading...

Share This Page