I'm struggling to overlay an opaque layer above an image with responsive text on top of it. I want the opaque layer to be positioned above the image but below the text, and not appear when hovering over the image.
You can view my test page here:
I attempted to add a layer div, but I am having trouble achieving the desired result.
Additionally, I am having difficulty aligning the orange button correctly with the right side of the image. It seems to display inconsistently in Chrome and Safari.
Any assistance would be greatly appreciated!
This is the code I have so far:
.containerbox {
position: relative;
color: white;
}
.top-left {
position: absolute;
top: 8%;
left: 0;
color: #000;
font-weight: 800;
background-color: #a79f9f;
padding: 6px 40px;
}
.bottom-right {
position: absolute;
bottom: 5%;
right: 17.5%;
color: #000;
font-weight: 800;
background: #de9104;
font-size: 14px;
padding: 4px 3%;
}
.bottom-right a {
color: white;
}
<div class="containerbox">
<img src="https://www.gorgeous-geek.com/wp-content/uploads/Laptop-on-desk-web-design.jpg" style="border: 1px solid #ececec;" alt="Laptop" style="width:100%;">
<div class="top-left">Top Left</div>
<div class="bottom-right"><a href="http://www.gorgeous-geek.com/thank-you-3/" rel="noopener noreferrer" target="_blank">Read more</a></div>
</div>
</div>