Applying a bacground image to a TR in IE

posted in: Uncategorized | 0

BronwenWeeGo.jpgEver tried to apply a background image to a table row (TR) and it looks all pretty in FireFox but gets applied to each cell in IE?

I’ve been pulling my hair out trying to apply a background image to a gridview.  I was getting the image in each cell or the image overlapped which didn’t work as my image was a different shape at one end.

To fix this in IE7 you set the postion relative on the row and set the background image to none on the td in your CSS i.e.

.ItemHeader {background:url(../Images/ItemHeaderPanel.png) no-repeat;position:relative}

.ItemHeaderAlternate td{background-image:none}