I am working with a table that has alternating gray background colors for every second row. However, I'm having trouble capturing the empty cells. Even though I have applied CSS to target every even row, the empty cells are not being affected. Here is the code snippet in question:
tr:nth-child(even) {
background-color: #dddddd;
}
I have tried using `td:empty` but it doesn't seem to work either. I'm a bit confused as to why this is happening.
Below is the HTML code:
<td>
<tr>
<td colspan="2">
<input type="text" placeholder="Add new email" v-model="email" />
<img @click="addEmailToQ" src="@/assets/Plus.png" />
</td>
</tr>
<!-- <h2>Emails</h2> -->
<tr style="text-align: left" v-for="(email, key) in emailList" :key="key">
{{email}}
</tr>
</td>