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 3 of 3
  1. #1
    New to the CF scene
    Join Date
    May 2007
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    How can I add padding to every cell in my table?

    I'd like every cell in my table to have padding-right but I was wondering if there was a way I can define this in my table element and have it cascade down... (eg. instead of adding a class to every table cell).

    Also, is there a list of which elements will cascade (eg. inherit) downward from a table to a table row or table cell?

    Thanks...

  • #2
    Senior Coder
    Join Date
    Aug 2002
    Location
    UK
    Posts
    2,789
    Thanks
    2
    Thanked 14 Times in 14 Posts
    Try this

    Code:
    <style type="text/css">
    
    td{
    padding-right:50px;
    }
    
    </style>
    for a specific table give it an id and use

    #mytable td{
    padding-right:150px;
    }

    where the id is mytable
    The silent one.

    The most dangerous thing in the world is an idea.
    The most dangerous person in the world is the one with an idea.

  • #3
    New to the CF scene
    Join Date
    May 2007
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Woah, I can't believe I didn't think of that...

    I know a little CSS but.... well, there is no excuse. Thank God it's friday!

    ...and thanks for your help!

    - John


  •  

    Posting Permissions

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