www.webdeveloper.com
Results 1 to 3 of 3

Thread: cellpadding in a single cell???

  1. #1
    Join Date
    Jul 2007
    Posts
    39

    cellpadding in a single cell???

    Hello,
    is it possible to assign different paddings to each cell?
    i made a table as the layout of the page, and in one cell i put a menu, i want the menu to float left, but with a little padding. if i assign cellpadding to some number in <table....> tag it affects whole table. i tried to write the same in the <td.....> cell but it didn't work.
    Thanks

  2. #2
    Join Date
    Jul 2007
    Posts
    219
    edit: vv See below vv
    Last edited by Ferret; 07-30-2007 at 05:35 PM.
    "...art can lead you to God...if it's not doing that, it's leading you the other way. It's certainly not leading you nowhere."
    Bob Dylan

  3. #3
    Join Date
    Jul 2007
    Posts
    219
    I think you must have done something wrong in your code.

    See this example:

    http://www.josiahkiehl.com/testpage.html

    HTML Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>Untitled Document</title>
    </head>
    
    <body>
    
    <table style="border: 4px; border-style: dashed">
    <tr>
    <td style="padding: 20px; background-color: #333333; color:#FFFFFF">
    20px padding
    </td>
    <td style="padding: 10px; background-color:#999999">
    10px padding
    </td>
    <td style="padding: 0px">
    0px padding
    </td>
    </tr>
    </table>
    </body>
    </html>
    If you don't see where you went wrong, feel free to post your code and I can try to point you in the right direction.
    "...art can lead you to God...if it's not doing that, it's leading you the other way. It's certainly not leading you nowhere."
    Bob Dylan

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles