Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6

Thread: Borders on <tr>

  1. #1
    Regular Coder
    Join Date
    Jul 2003
    Location
    Denmark
    Posts
    111
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Exclamation Borders on <tr>

    Is there a way to put a border on a <tr>?

    Isn't it very stupid that it is not possible by default?

  • #2
    Regular Coder
    Join Date
    Feb 2005
    Location
    Lawrence, Kansas
    Posts
    125
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Using CSS? If so, write this in the stylesheet:

    tr { border: 1px solid black; }

    Of course, you can use whatever size and color you like, just change it!

  • #3
    Regular Coder
    Join Date
    Jul 2003
    Location
    Denmark
    Posts
    111
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Am I a complete fool if it doesn't work?

  • #4
    cfc
    cfc is offline
    Regular Coder
    Join Date
    Dec 2004
    Location
    Keswick, Ontario
    Posts
    251
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I think table rows are supposed to be purely semantic (i.e. not styled). You're not a fool, I tested it with FF's CSS editor on this page with a 3px solid red (just in case I missed it ) border on table rows and it didn't work. You'll probably have to style your <th> elements, <td> elements, and/or <table> elements to get what you're looking for.

  • #5
    Regular Coder
    Join Date
    Feb 2005
    Location
    Lawrence, Kansas
    Posts
    125
    Thanks
    0
    Thanked 0 Times in 0 Posts
    You know, I may have been thinking about the cells instead of the rows. Hmm...

  • #6
    Senior Coder
    Join Date
    Jun 2002
    Location
    The Netherlands, Baarn, Ut.
    Posts
    4,253
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Specs

    If all else fails: check the specs!
    From the section on table borders it doesn't appear that rows can be styled; instead, style the cells within the row to achieve the desired effect.
    Regards,
    Ronald.
    ronaldvanderwijden.com


  •  

    Posting Permissions

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