table border color?

Discussion in 'HTML & Website Design' started by bobby9101, Jul 16, 2005.

  1. #1
    when i create a table like this
    [​IMG]
    the border is 2D-ish
    is it possible to make it a solid color?
     
    bobby9101, Jul 16, 2005 IP
  2. tflight

    tflight Peon

    Messages:
    617
    Likes Received:
    38
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Try something like this:

    <table border="0" width="100%" bgcolor="#00f">
    <tr bgcolor="#fff">
    <td>Hey<hr>Thank</td>
    </tr>
    </table>
    Code (markup):
    You might need to force all of the other tr's and td's to have the #fff bgcolor as well with multiple cells.
     
    tflight, Jul 16, 2005 IP
  3. J.D.

    J.D. Peon

    Messages:
    1,198
    Likes Received:
    65
    Best Answers:
    0
    Trophy Points:
    0
    #3
    <table style="border: 1px solid blue">
     
    J.D., Jul 16, 2005 IP
  4. stuw

    stuw Peon

    Messages:
    702
    Likes Received:
    44
    Best Answers:
    0
    Trophy Points:
    0
    #4
    <table class="mystyle">
    <tr>
    <td>hello</td>
    </tr>
    </table>

    and then in your style sheet set a border for your table and for your cells

    table.mystyle {border:1px solid blue}
    table.mystyle td {border:1px solid blue}
     
    stuw, Jul 17, 2005 IP
  5. J.D.

    J.D. Peon

    Messages:
    1,198
    Likes Received:
    65
    Best Answers:
    0
    Trophy Points:
    0
    #5
    If you want border around all cells, you probably will need collapsing borders:

    table.mystyle {border-collapse: collapse; border: 1px solid blue;}

    J.D.
     
    J.D., Jul 17, 2005 IP
  6. bobby9101

    bobby9101 Peon

    Messages:
    3,292
    Likes Received:
    134
    Best Answers:
    0
    Trophy Points:
    0
    #6
    i got it thanx
     
    bobby9101, Jul 17, 2005 IP