Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6072429
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T10:09:33+00:00 2026-05-23T10:09:33+00:00

I just designed the Pm System[a simple rather to say], now i wanted to

  • 0

I just designed the Pm System[a simple rather to say], now i wanted to design a color selector for the system, when viewing all pm’s it should be shown with different colors similar to google’s approach on gmail. below is my existing database schema

**Messages:**

Id:int identity 1,1

Message: nvarchar(500)

From:nvarchar(100)

To:nvarchar(100)

IsDeleted: Bit

IsRead: Bit

How can i add a Color field in a way that it does not interfere with existing setup. Ex, color for Read messages, color for Deleted Messages[lol] so that i could show distinction using background color

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T10:09:34+00:00Added an answer on May 23, 2026 at 10:09 am

    I’m assuming (perhaps wrongly) this is being output as HTML.

    Databases are for data, the colour of a read message is presentation. Rather then store a colour in the database for every single message, or even once in a table just for that, use HTML to indicate its status.

    When you’re outputting the message list in HTML add a class that indicates it’s status based on the database value:

    <div id="message" class="read"> ... message details ... </div>
    <div id="message" class="deleted"> ... message details ... </div>
    

    In your CSS define the style for read, deleted etc however you want:

    .read { 
        background: #e0e0e0;
    } 
    
    .deleted {
        background: #e0e0e0;
        color:      #ccc;
    }
    

    This keeps your database, your HTML, and your CSS all separate which is the way it should be.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I just designed a simple For Loop using window form application. I would like
I have a quite simple WCF service method which returns an IQueryable, just for
Let me explain the use case... In a simple python web application framework designed
I've seen this twice now, and I just don't understand it. When calculating a
ASP.NET MVC 2.0: Simple Model Binding not working/binding as it should i have a
I have designed my own synthesizer in java and I now want to connect
Background: I'm working on an application that already has a thread system designed. It's
I previously designed the website I'm working on so that I'd just query the
I have designed a comment system. This is what I am basically doing. $story=$_POST['story'];
I have designed an e-commerce system whereby I have products which can belong to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.