tags:

views:

320

answers:

3

I have given a table background image using css background-image property. The cells are given opacity settings so that the image is shown through the cells. In Firefox it works perfectly but in IE all the cells(TDs) are showing the background image. How do I fix the issue in IE. Click the link below for the page

html page here

+2  A: 

All the individual cells seem to inherit the background-image styling from the table.

Adding something like

td { background: transparent; }

seems to fix the problem in IE.

kkyy
This works, but the background colors given to the "td" are getting removed.
Shivanand
Naturally, as the td background color is set to transparent :)That was just a quick example, the main point being that you should remove the background image from the cells by setting their background-image to none one way or another.
kkyy
How can I do that.
Shivanand
td { background-image: none; }
kkyy
that is not working.
Shivanand
Actually, now that I looked into the code, you just can't have both the watermark and the background-colors of the rows visible, because if the cells have a background color, you just can't see the whole table's background image through them; you can think of the cells being "on top" of the parent table.
kkyy
I have given opacity to the table cells. Please check the internal styles in the head section.
Shivanand
A: 

Could you wrap the table in a div?

If so then you could apply the background image to the div wrapper, which shouldn't affect the table or its cells in any way :)

Wayne Austin
Tried but this suggestion is not helping
Shivanand
How is it not helping? provided u dont have a background property applied to the table tag the background image from the div will show through.
Wayne Austin
It works in Firefox but not in IE. I have given opacity to the table cells. Please check the internal styles in the head section.
Shivanand
A: 

I got the solution. I have added "td" to the selectors tr.normalRow, tr.alternativeRow, tr.selectedRow, tr.hoverRow and also added the property "background-image: none;". Here is the code I used:

Code:

tr.normalRow td{ background: #FFFFFF; font-size: 11px; cursor: pointer; filter: alpha(opacity = 90); -moz-opacity: .90; opacity: .90; background-image: none; }

tr.alternativeRow td{ background: #f4f4f4; font-size: 11px; cursor: pointer; filter: alpha(opacity = 90); -moz-opacity: .90; opacity: .90; background-image: none; }

tr.selectedRow td{ background: #fff19f; font-size: 11px; cursor: pointer; filter: alpha(opacity = 90); -moz-opacity: .90; opacity: .90; background-image: none; }

tr.hoverRow td{ background: lightblue; font-size: 11px; cursor: pointer; filter: alpha(opacity = 90); -moz-opacity: .90; opacity: .90; background-image: none; }

Shivanand