Hi
In below i want background should be green and forecolor white similar to below link - youtube.com/watch?v=tSOrzw2uGQY
htmlTable.Append("Sr. Name Status Action ");
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. Name Status Action ");
Thanks
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Adarsh NigamPosted Aug 17, 2024, 1:40 PM
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 ");
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.