My issue is clearly visible in this image:
The div element is transparent and affecting the images inside it. Below is my HTML code:
<div id="cselect" style="position: absolute; top: 99px; left: 37px; display: block;">
<div class="cnvptr">
<img src="uploadfabrics/14606171783156.jpg" >
</div>
<div class="cnvptr">
<img src="uploadfabrics/16292373497271.jpg" ></div>
</div>
These are the CSS codes I'm using:
#cselect {
padding: 15px;
width: 90%;
padding: 2%;
background: black;
opacity: 0.5;
position: relative;
}
.cnvptr {
background: black;
opacity: 1 !important;
width: auto;
display: inline-block;
}
I tried putting a div around each image with class cnvptr
, giving it a black background, but the transparency remains. How can I prevent the image backgrounds from being transparent?
Thank you.