Striving to enhance my CSS3 skills and move away from using table tags in my ASP.NET project, I am currently working with Visual Studio 2010, .NET 4.0, and VB.Net. Specifically, I am facing an issue with a listview where I am attempting to alternate the row colors. While my current implementation partially works, it only affects a small line across each row rather than covering the entire row. Here is the code snippet:
div.row
{
clear: both;
padding-top: 5px;
}
div.row:nth-child(1n+3)
{
background-color: #C0C0C0;
}
div.row span.label
{
float: left;
text-align: right;
padding-right: 5px;
font-weight: bold;
}
div.row span.cell
{
float: left;
text-align: left;
}
Below is the markup for reference:
<ItemTemplate>
<div class="row" >
<!-- Content Here -->
</div>
</ItemTemplate>
I have also attempted to use alternatingItemTemplate without much success in achieving the shading effect. Any insights or assistance on what could be going wrong would be highly appreciated.