Sorry for the not-so-great title, I'm still learning the terminology.
I have a situation where a div is covering part of a background image when the screen is wide. However, on smaller screens, I want that div to move below the background image instead of continuing to cover it up—just like in this example:
https://codepen.io/Ywehc/pen/KQqQeN
<div class="container-fluid" style="width:cover">
<img src="https://images.unsplash.com/photo-1490641525855-f5ffa411459d?ixlib=rb-0.3.5&ixid=eyJhcHBfaWQiOjEyMDd9&s=85bad8135a13687bbd2ac661023e8dc4&auto=format&fit=crop&w=1189&q=80" style="width:100%">
<div class="overlaid-div" style="background-color: blue; height: 15em; width: 20em; margin-left:50%; margin-top: -100px; position: relative">
</div>
<div class="randomelement" style="width: 30em; height:10em; background-color: black">
</div>
</div>
Basically, I want the overlay to stay for large screens but stack the divs vertically as the screen gets smaller so that the blue div doesn't cover anymore.
Thanks so much!