#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2003
    Posts
    1
    Rep Power
    0

    Talking CSS for table borders


    This will be my first attempt at using css. I need to put a border in a table, it needs to be down the second column only. How do I go about doing this. Thanks
  2. #2
  3. No Profile Picture
    Mid-level Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2003
    Posts
    44
    Rep Power
    11

    insert table in second colum


    Someone correct me if I am wrong but you cannot put a border around a specific column. I suggest you insert a table with a border for the second column.
  4. #3
  5. mod_dev_shed
    Devshed Supreme Being (6500+ posts)

    Join Date
    Sep 2002
    Location
    Atlanta, GA
    Posts
    14,817
    Rep Power
    1099
    Code:
    <html>
    
    <head>
    <title>FooBar</title>
    <style type="text/css">
    td
      {
      padding: 3px;
      }
    #foo
      {
      border-collapse: collapse;
      border: 0px none;
      }
    #col2top
      {
      border-top: 1px solid black;
      }
    .col2
      {
      border-right: 1px solid black;
      border-left: 1px solid black;
      }
    #col2bottom
      {
      border-bottom: 1px solid black;
      }
    </style>
    </head>
    
    <body>
    <table id="foo">
      <tr>
        <td>A</td>
        <td id="col2top" class="col2">B</td>
        <td>C</td>
      </tr>
      <tr>
        <td>J</td>
        <td class="col2">K</td>
        <td>L</td>
      </tr>
      <tr>
        <td>X</td>
        <td id="col2bottom" class="col2">Y</td>
        <td>Z</td>
      </tr>
    </table>
    </body>
    
    </html>
    # Jeremy

    Explain your problem instead of asking how to do what you decided was the solution.
  6. #4
  7. No Profile Picture
    Mid-level Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2003
    Posts
    44
    Rep Power
    11

    i stand correct


    I stand corrected.

IMN logo majestic logo threadwatch logo seochat tools logo