SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Wizard
    Join Date
    Jun 2005
    Posts
    1,441
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Defining cell attributes for a whole table

    Can anyone please let me know how you code the css for a table, so that all of the cells within the table, have certain attributes, like border and padding etc, like below ? (I tried the code below, but it didn't work ?)

    .misc-table {
    width: 100%;
    border: 1px;
    padding: 3px;
    margin: 2px;
    border-color: navy;
    vertical-align: middle;
    text-align: left;
    }

    Also, is there any way of defining the font styles and sizes in each cell as well please ?

    Any help much appreciated.

    Dez.

    p.s. In this context, what's the difference between margin and padding please ?

  2. #2
    SitePoint Wizard ryanhellyer's Avatar
    Join Date
    Oct 2006
    Location
    New Zealand
    Posts
    2,323
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

  3. #3
    SitePoint Wizard
    Join Date
    Jun 2005
    Posts
    1,441
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Many thanks Ryan - much appreciated.

    Dez.


Bookmarks

Posting Permissions

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