<section class="quotes">
<div class="container">
<h2 class="section-title">Recommended</h2>
<div class="quotes-wrapper">
<article class="quote">
<blockquote>
<q>I like the things around me to be beautiful and slightly dreamy, with a feeling of worldliness.</q>
<footer>Alice Temperley</footer>
</blockquote>
</article>
</div>
</div>
</section>
[off-topic]
When you post code in the forum, you need to format it. To do so you can either select all the code and click the </> button, or type 3 backticks ``` on a separate line both before and after the code block.
but container is used also for other sections and has already styling which i want to keep. i want add this overlay to quotes section only.
and even if i create a new div class to replace container and use your code, overlay doesnt cover all background image because section (which also is used multiple times) has padding
You would need position:relative on .quotes to create the stacking content for the absolute :before element.
Then you would most likely need a z-index of minus one on .quotes:before (or a higher z-index on the content in that quotes section (only positioned elements can have z-index applied)).
Yes that was the element that created the stacking context but I suggest you still use the other rules I gave as they are more reliable and avoid using opacity.