Little trouble in using css, in the below code, i have used odd and even classes of css to change the background color. But whenever there is a backup(as highlighted) it should display the values as italics along with the odd and even properties. how to achieve this ?
<c:forEach items="${as.value.connections}" var="circuit" varStatus="elements">
<c:set var="stylesheetclass" value="primaryLine"/>
<c:set var="icon" value="/images/primary.png"/>
<c:if test="${circuit.backup}">
> <c:set var="stylesheetclass" value="backupLine"/>
>
>
> <c:set var="icon" value="/images/backup.png"/>
</c:if>
> <tr class="${elements.index % 2 == 0 ? 'odd' : 'even'}">
<td >
First of all if you make the functionality as if that a new class is added in the
<tr>when backup value is present. For example if you add a class namedbackupthen the<tr>would look like this<tr class="odd backup"> or <tr class="even backup">. After doing this functionality add the styles like below :-Edit:
If you place the styles which you want to keep for the backup
<tr>inside the.backupclass your requirement would be achieved. And please keep the.backupclass below the.even and .oddclass. As styles written above gets overwritten with the below ones.