SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Mar 2006
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Tables with inner border - possible?

    Hello!

    I've been trying to do this for a while now, is it possible to have a table that has, e.g.:

    * a red border
    * a grey border for the table cells


    When I try to do this with CSS, even with border-collapse on, the red and grey border collapse.

    It's very weird, maybe someone can help?



    Thanks
    Attached Images Attached Images

  2. #2
    Non-Member daedalux's Avatar
    Join Date
    Jan 2006
    Location
    Charlotte, NC
    Posts
    153
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Use this table code (you can adjust cellspacing to increase the space between the cell borders and the table borders as you like):

    <table cellspacing="1" style="border:1px solid #FF0000">
    <tr>
    <td style="border:1px solid #CCC"> Cell contents </td>
    </tr>
    </table>
    You'll most likely want to give the td style its own class in your stylesheet, in which case the td HTML would look like this:

    <td class="xxxxx"> Cell contents </td>


Bookmarks

Posting Permissions

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