Hi
In below i want background should be green and forecolor white similar to below link - youtube.com/watch?v=tSOrzw2uGQY
C#
htmlTable.Append("Sr.NameStatusAction");Thanks
Hi
In below i want background should be green and forecolor white similar to below link - youtube.com/watch?v=tSOrzw2uGQY
htmlTable.Append("Sr.NameStatusAction");Thanks
Know the answer? Post it. Somebody with the same question will find it here.
Adarsh NigamRank #950 · 2.1K reputationPosted Aug 17, 2024, 9:40 AM EDT
You can add the following code to set the background color to green and text color to white for the table header:
Sr. Name Status Action ");
element:
Sr. Name Status Action ");
or elements and define the styles in your CSS file:
Sr. Name Status Action ");
Know the answer? Forums 01
Arun PottiAnswers in the forums20answers02
Tahir AnsariAnswers in the forums5answers03
Kamlesh KumarAnswers in the forums5answers04
Sam HobbsAnswers in the forums4answers05
Željko PerićAnswers in the forums3answers?YouYour name goes here.Every answer: 20 SHARP.Join Full leaderboard → 2026
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
htmlTable.Append("
This will apply the styles to the entire table header row. If you want to apply the styles to individual table header cells, you can add the styles to each
htmlTable.Append("
Alternatively, you can use CSS to style the table header. You can add a CSS class to the
htmlTable.Append("
And in your CSS file:
.header-row {
background-color: green;
color: white;
}
This way, you can easily change the styles by modifying the CSS file without having to update the code.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questionsTop experts