views:

366

answers:

3

I am using a jQuery content rotator and I want to place a PNG image on top of a image and on top of that text.

This is how my rotator looks like in HTML:

      <div id="testimonials">
    <div class="slides">

    <div class = "testimonialContainer">
    <div class ="leesmeer"> <a href ="http://site/link"&gt;&lt;img src ="http://site/afbeeldingen/test.jpg" ><div class="caption">LORUM IPSUM DOLOR SIT AMET </div></a></div>
    </div>

    <div class = "testimonialContainer">
    <p class = "testimonial"> 2 </p>
    <div class ="leesmeer"> <a href ="http://site/link"&gt;&lt;img src ="http://site/afbeeldingen/test.jpg" ></a></div>
    </div>

</div>
</div>

Here is the CSS:

.testimonialContainer {height: 123px}

    #testimonials{
    width: 210px;
    height: 125px;
    }

    .slides div{
    width: 210px;
    xheight:  25px;
    xpadding: 5px;

    .slides div.caption{
        background-image: url(../images/h_contentrotator_zwart.png);
        /*background-color:#000000;
        filter:alpha(opacity=60);
        -moz-opacity: 0.6;
        opacity: 0.6;*/
        color: #fff;
        width: 210px;
        height: 41px;
        position: relative;
        top: -24px;
        padding: 2px 20px 2px 10px;
        zbehavior: url("iepngfix.htc")
    }

The problem is that the PNG image doesn't appear and also the text doesn't appear.

Can someone help me out?

+1  A: 

You need to add a dot (.) at last selector:

.slides div.caption{

Right now it's not there, but should be.

If the problem is not solved after adding a dot then be more specific. Change

.slides div.caption

to this:

#testimonials a div.caption

And remove Z from behaviour.

And even if it is not solved then give me a link of jQuery script homepage.

metal-gear-solid
thanks. I added the dot. But it didn't solve the problem ;-)
sanders
A: 

I did change it to this:

.testimonialContainer {height: 123px}

#testimonials{
width: 210px;
height: 125px;
}

.slides div{
    width: 210px;
    xheight:  25px;
    xpadding: 5px;

    /*.slides div.caption{*/
    #testimonials a div.caption{
        background-image: url(../images/h_contentrotator_zwart.png);
        /*background-color:#000000;
        filter:alpha(opacity=60);
        -moz-opacity: 0.6;
        opacity: 0.6;*/
        color: #fff;
        width: 210px;
        height: 41px;
        position: relative;
        top: -24px;
        padding: 2px 20px 2px 10px;
        behavior: url("iepngfix.htc")

}

But it still doesn't save the problem.

sanders
A: 

Make sure that you have the right path to the background image. If the style is in the <head> of the HTML page, then the path will be relative to the HTML page. If the style is within an external stylesheet, then the path will be relative to the file location of the stylesheet.

You also might want to get it working without the Internet Explorer 6 PNG fixes first, and then add the fixes back in after you know the rest of the code is correct.

David Kolar