Bonjour,
J'ai besoin de vos lumières, j'essaie d'attribuer une class à une cellule en fonction de son résultat récupérer avec la variable
Code :
{if $ad.SPECIAL}{/if}
qui attribue la class exemple
Code :
1 2 3
| .exemple{
background: #E6CCFF;
} |
En gros si l'annonce et une annonce premium (annonce avec option payante) alors elle est surligner en violet.
http://kitten13.dyndns.org/index.php
J'arrive a faire ce que je veu pour certaine cellule saut pour le
titre/description et
l'image.
En fait il me remplace la classe pointer
comment faire pour lui attribuer la class d'origine ou sinon celle d'origine plus surligner ?
en gros voici ce que j'ai fait :
Code :
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
| <table cellspacing="0" class="box2" style="clear:both;">
{foreach item=ad from=$ads}
<tr onmouseout='this.className="alt";' onmouseover='this.className="class1";'>
<!-- ********************* ici probleme je narrive pas *********************************** -->
<td>{$ad.IMAGEYESNO}</td>
<td class="pointer"><a href="{$ad.LINK}" title="{$ad.TITLE|escape}">{$ad.TITLE|truncate:35:"...":true}</a><a href="{$ad.LINK}" style="text-decoration:none; color: #000; font: 13px verdana, sans-serif;" class="description">{$ad.DESCRIPTION|truncate:200:"...":true}</a></td>
<!-- ********************* fin *********************************** -->
<!-- ********************* ici probleme la classe et remplacer *********************************** -->
{if $ad.SPECIAL}<td class="exemple"><a href="{$ad.LINK}" style="text-decoration:none; color: #000; font: 13px verdana, sans-serif; display: block; font-weight:bold;">{if $e.islink}{/if}{$ad.e_2.value|commify:2} Eur</a></td>{/if}
{foreach item=extraval from=$ad.EXTRA_VALUES} {if $ad.SPECIAL}<td class="exemple">{$extraval|truncate:20:"...":true} </td>{/if}{/foreach}
{if $ad.SPECIAL}<td class="exemple"><a href="{$ad.LINK}" style="text-decoration:none; color: #000; font: 13px verdana, sans-serif; display: block;">{$ad.REGDATE}</a></td>{/if}
<!-- ********************* fin *********************************** -->
</tr>
{/foreach}
</table> |
mon ccs :
Code :
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71
| .box2 {
margin: 5px 0px;
border-top: 5px solid #eeeeee;
background: #fff;
}
.box2 td {
padding: 5px 0px !important;
border-bottom: 1px solid #E5E5EA;
}
.box2 td.category {
background: url("../layout_images/new/folder.gif") 14px 9px no-repeat;
padding-left: 36px !important;
}
.box2 tr.alt td.category {
background: #e7ebf0 url("../layout_images/new/folder.gif") 14px 9px no-repeat;
padding-left: 36px !important;
}
.box2 th {
height: 23px;
padding: 5px 14px !important;
padding: 2px 14px;
white-space: nowrap;
text-align: left;
vertical-align: middle;
color:#848484;
font-size:11px;
font-weight:bold;
padding:5px 3px 3px;
}
.box2 th a {
color:#848484;
font-size:11px;
font-weight:bold;
padding:5px 3px 3px;
}
.box2 th a:hover {
text-decoration: underline;
}
.box2 td a, #content a {
text-decoration: underline;
display: block;
}
.box2 td a strong {
font-size: 110%;
}
.box2 td a:hover, .box td a:hover strong, #content a:hover {
display: block;
}
.box2 tr.alt {
background: #fff;
}
.box2 td.pointer {
background: 14px 10px no-repeat;
padding-left: 0px !important;
border-bottom: 1px solid #E5E5EA;
}
.box2 tr.alt td.pointer {
background: #fff 14px 10px no-repeat;
padding-left: 0px !important;
border-bottom: 1px solid #E5E5EA;
}
.exemple{
background: #E6CCFF;
} |