Results 1 to 6 of 6

Thread: Table CSS formatting [resolved]

  1. #1

    Thread Starter
    Member filburt1's Avatar
    Join Date
    Aug 1999
    Posts
    6,935

    Table CSS formatting [resolved]

    How can I make a cellpadding of 10 pixels above and below table rows but 0 pixels to the left and right?
    Last edited by filburt1; Dec 8th, 2001 at 12:40 PM.

  2. #2
    Frenzied Member
    Join Date
    Feb 2001
    Posts
    1,140
    Travis, Kung Foo Journeyman
    As always, RTFM.

    WWW Standards: HTML 4.01, CSS Level 2, ECMA 262 Bindings to DOM Level 1, JavaScript 1.3 Guide and Reference
    Perl: Learn Perl, Llama, Camel, Cookbook, Perl Monks, Perl Mongers, O'Reilly's Perl.com, ActiveState, CPAN, TPJ, and use Perl;
    YBMS, but Mozilla doesn't.

  3. #3

    Thread Starter
    Member filburt1's Avatar
    Join Date
    Aug 1999
    Posts
    6,935
    Sort of, I tried margin-top and margin-bottom but they didn't work when I put them in the TD or TR tags.

  4. #4
    Black Cat JoshT's Avatar
    Join Date
    Nov 2000
    Location
    WNY, USA
    Posts
    4,032
    Code:
    <tag style="padding-top:10px;padding-bottom:10px;padding-left:0px;padding-right:0px">
    You'll probably need to play with the padding and margin (and maybe border) for the TABLE, TR, and TD tags to get the look you want.
    Josh
    Get these: Mozilla Opera OpenBSD
    I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.

  5. #5
    scoutt
    Guest
    the only way I think to solve this is to make a transparent gif the size you want and put it above and/or below the text/image in the cell.

    cellpadding is all around the cell, don't recall it being selective like you want.

    top-margin is for the browser not table cells.

  6. #6

    Thread Starter
    Member filburt1's Avatar
    Join Date
    Aug 1999
    Posts
    6,935
    It worked beautifully.

Posting Permissions

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



Click Here to Expand Forum to Full Width