I am grappling with a situation where I have a div containing text within <p>
tags, and also an accompanying PNG image. My goal is to position the image to the left of the div so that it overlaps with the text. Despite my attempts at utilizing z-index, I have not achieved the desired result.
Here is the HTML code snippet:
<div class="caption">
<img src="images/stain.png" id="stain">
<p>The BA New Media course which I am studying is run by the Institute of Comminications Studies (ICS) at The University of Leeds. The Institute of Communications Studies is an internationally renowned centre for teaching and research in communications, media and culture. Their research is multidisciplinary and has particular strengths in the areas of cultural industries, international communication and political communication. <a href="http://ics.leeds.ac.uk/about/" target="_blank"><strong class="more">Read More...</strong></a>
</div>
And here is the CSS code snippet:
.caption {
width:80%;
display:block;
margin:auto;
margin-top:5%;
z-index:5;
}
#stain {
z-index:1;
}