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 4 of 4
  1. #1
    New Coder
    Join Date
    Feb 2005
    Location
    Nowhere.
    Posts
    24
    Thanks
    0
    Thanked 0 Times in 0 Posts

    How to change the color of the borders of a table?

    I have a standard HTML table. How can I modify the color of it's borders (inner and outer)?

  • #2
    Senior Coder chilipie's Avatar
    Join Date
    Jul 2004
    Location
    Shrewsbury, UK Age: 16
    Posts
    1,117
    Thanks
    0
    Thanked 0 Times in 0 Posts
    One way:
    Code:
    td {
    border: 1px solid #000; /* Will make all table cells have a 1px solid black border. */
    }
    You could change that if you want to give the other table elements a border:
    Code:
    table {
    border: 1px solid #f00; /* Will make all tables have a 1px solid red border. */
    }
    tr {
    border: 1px solid #00f; /* Will make all table rows have a 1px solid blue border. */
    }

  • #3
    New Coder
    Join Date
    Feb 2005
    Location
    Nowhere.
    Posts
    24
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thank you.

  • #4
    Senior Coder chilipie's Avatar
    Join Date
    Jul 2004
    Location
    Shrewsbury, UK Age: 16
    Posts
    1,117
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Any time .


  •  

    Posting Permissions

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