I have panel which I colored blue if this panel is being selected (clicked on it). Additionally, I add a small sign (.png
image) to that panel, which indicates that the selected panel has been already selected before.
So if the user sees for example 10 panels and 4 of them have this small sign, he knows that he has already clicked on those panels before. This work fine so far. The problem is now that I can't display the small sign and make the panel blue at the same time.
I set the panel to blue with the css background: #6DB3F2;
and the background image with background-image: url('images/checked.png')
. But it seems that the background color is above the image so you cannot see the sign.
Is it therefore possible to set z-index
es for the background color and the background image?
You can also use short trick to use image and color both like this :-
<li style="background-color: #ffffff;"><a href="/<%=logo_marka_url%>"><img border="0" style="border-radius:5px;background: url(images/picture.jpg') 50% 50% no-repeat;width:150px;height:80px;" src="images/clearpixel.gif"/></a></li>
Other Sample Box Center Image and Background Color
1.First clearpixel fix image area 2.style center image area box 3.li background or div color style
For me this solution didn't work out:
But instead it worked the other way:
the css:
You need to use the full property name for each:
Or, you can use the background shorthand and specify it all in one line:
really interesting problem, haven't seen it yet. this code works fine for me. tested it in chrome and IE9