Results 1 to 3 of 3

Thread: Styling <tr> elements?

  1. #1
    Join Date
    Feb 2005

    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:

    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
    Depending on the exact effect you're trying to achieve, perhaps what you need is:
    table.general td {
      font-weight: bold;
      padding: 0.5em 0;
      border-bottom: 1px solid;
    "Well done....Consciousness to sarcasm in five seconds!" ~ Terry Pratchett, Night Watch

    How to Ask Questions the Smart Way (not affiliated with this site, but well worth reading)

    My Blog
    cwrBlog: simple, no-database PHP blogging framework

  3. #3
    Join Date
    Feb 2005
    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