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 3 of 3
  1. #1
    Regular Coder dniwebdesign's Avatar
    Join Date
    Dec 2003
    Location
    Carrot River, Saskatchewan
    Posts
    846
    Thanks
    15
    Thanked 10 Times in 10 Posts

    Two (or more) background colours in one table row?

    I have a table that lists data from a database and my php decides what bg color to make the table depending on the status's of the row. (In this case "Mailed", "Paid", "Partial Paid", "Overdue", "Viewed Online"). Works just fine, however sometimes these may have duplicate status's such as Mailed and Viewed Online. Is there anyway to have the bg color two colours stripped such as a construction bar? (IE Below) Most likley using CSS of course, I'd prefer not to use images if possible. Thanks

    Dawson Irvine
    CEO - DNI Web Design
    http://www.dniwebdesign.com

  • #2
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,698
    Thanks
    6
    Thanked 1,011 Times in 984 Posts
    You’ll have to use an image as that’s not possible with CSS alone. However, you can just assign a certain class according to the certain state and then apply the respective image using th class selector (and you can reduce a striped image to its minimum repeatable size and make it repeat itself to fill the cell).

  • #3
    New Coder
    Join Date
    Feb 2011
    Posts
    41
    Thanks
    0
    Thanked 4 Times in 4 Posts
    Hi,
    Using image and not using the image depends on
    you requirement just add span to split and have two colors inside the table


  •  

    Posting Permissions

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