multicolored table border w/ CSS?

Discussion in 'OT Technology' started by crotchfruit, Aug 25, 2003.

  1. crotchfruit

    crotchfruit Guest

    is it possible (how?) to make a multicolored table border in CSS?

    for example, let's say i had table A with a thick red border, and i put table B with a thick blue border inside of it. this would make "one table" with a thick blue border surrounded by a thick red border. is it possible to collapse the two tables into one and give it the two concentric border colors using CSS?
     
  2. Penguin Man

    Penguin Man Protect Your Digital Liberties

    Joined:
    Apr 27, 2002
    Messages:
    21,696
    Likes Received:
    0
    Location:
    Edmonton, AB
    :dunno: Put the table inside a DIV?
     
  3. Astro

    Astro Code Monkey

    Joined:
    Mar 18, 2000
    Messages:
    2,047
    Likes Received:
    0
    Location:
    Cleveland Ohio
    I'm with Penguin Man on this one. CSS only allows for one border per element. You've defined the border of the table already so you're stuck there. But if you wrap div tags around the outside of your table, you can then specify the outer color to the div tag and in theory, you're good to go. Although this is all in theory.

    If you want backwards compatible non-CSS, then the approach would be to embed your table into several 1 cell tables where you use the table background color and some cell padding to simulate your desired effect. To see just one color in action (uses 2 tables), check out the html: http://www.tekro.com/websignup.php
     

Share This Page