www.webdeveloper.com
Results 1 to 2 of 2

Thread: Question about cellpadding

  1. #1
    Join Date
    Sep 2006
    Location
    St. Louis, MO
    Posts
    30

    Question about cellpadding

    I know that I can use HTML to set the cellpadding for an entire table, and I think I can do it cell-by-cell with CSS, but I would like to know if there any way to set cellpadding on the <td> level rather than at the <table> level with straight HTML?

  2. #2
    Join Date
    Feb 2003
    Location
    Michigan, USA
    Posts
    5,755
    You'll want to use Cascading Style Sheets. The following code would go in an external CSS file, LINK'd to in your HTML document.
    Code:
    .cellType1 {
     padding: 3px;
    }
    
    .cellType2 {
     padding: 7px;
    }
    Then in your HTML...
    HTML Code:
    <table>
      <tr>
        <td class="cellType1">Yeah</td>
        <td class="cellType2">Buddy</td>
      <tr>
    </table>

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