www.webdeveloper.com
Results 1 to 3 of 3

Thread: Styling <tr> elements?

  1. #1
    Join Date
    Feb 2005
    Posts
    200

    Question Styling <tr> elements?

    I've got a style sheet (won't include a reference here but it's simple) in which I'm trying to style every <tr> element within a table with the class attribute set to "general". What I'm doing is similar to this:

    Code:
    table.general tr{font-weight: bold; padding: 0.5em 0; border-bottom: 1px solid;}
    And guess what? the font turns bold, but neither the padding nor the border shows up.

    I'm using Firefox 1.X for Mac OS (Normally understands almost every style sheet). Is there something in the documentation that sais anything about borders and paddings not being applicable to <tr> elements specifically? If not, who's doing this to me, and why?

  2. #2
    Join Date
    Aug 2004
    Location
    Ankh-Morpork
    Posts
    19,326
    Depending on the exact effect you're trying to achieve, perhaps what you need is:
    Code:
    table.general td {
      font-weight: bold;
      padding: 0.5em 0;
      border-bottom: 1px solid;
    }
    "Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
    ~ Terry Pratchett in Nation

    eBookworm.us

  3. #3
    Join Date
    Feb 2005
    Posts
    200
    So borders and padding cannot be set on <tr> elements? If not, do you know why not?

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