Click here to Skip to main content
15,867,594 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I'm working on mvc 3 razor view.I have a table with three rows in it. i want to color the first row with blue color. is there any property in the site.css so that i can use it. there is no property in the site.css file that i can use to fill the first row with blue then how do i do it? is there any propertis that i missed? or do i have to do a for loop if so hw do i do it?
Posted

1 solution

You can use Table header color to color first row of your table.
as
HTML
<th style="color:blue;background-color:yellow>Your First row</th>

or you can also for alternate row color

http://www.somacon.com/p338.php[^]
 
Share this answer
 
v2
Comments
Sergey Alexandrovich Kryukov 29-Dec-11 22:47pm    
Simple and easy, my 5.
As to alternate, this is the only static solution. With JavaScript, very elegantly implemented with jQuery, in just one line with automatic alternation.
--SA
RaviRanjanKr 30-Dec-11 2:27am    
Thanks :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900