Test d'un background-image appliqué sur le TR d'un tableau

Besoin : une liste d'éléments sélectionnables (avec menu contextuel et gestion du double clic), avec certaines lignes à rendre de manière bien différente. Pour certaines, besoin d'avoir une image de fond, et donc usage de background-image sur l'élément TR

Ici des exemples simplifiés.

Background sur un TR.maclasse

Col1 Col2 Col3 Col4 Col5
AAAA BBBB Sans image de fond
AAAA BBBB Avec image de fond
AAAA BBBB Sans image de fond

Méthode contournement : changer l'image

Col1 Col2 Col3 Col4 Col5
AAAA BBBB Sans image de fond
AAAA BBBB Avec image de fond
AAAA BBBB Sans image de fond

Hack pour IE

Appliquer aux td :


td {background-position:expression(-this.offsetLeft);}
Col1 Col2 Col3 Col4 Col5
AAAA BBBB Sans image de fond
AAAA BBBB Avec image de fond
AAAA BBBB Sans image de fond