Using a single outer wrapper container, is it possible to have a background color immediately next to a background photo as in the attached image? It needs to be a single wrapper, because I’d like to add a child div inside that will overlap this entire area. The photo needs to grow/shrink at the container grows/shrinks with the browser.
<div class="outerWrapper">
<div class="innerWrapper"></div>
</div>
2
Answers
Yes. Backgrounds can be stacked/layered, sized and positioned. No layering is required to have a color with an image beside, just sizing and positioning.
After running this snippet, use the full page link to test the responsive behaviour.
Alternate solution using Flexbox to achieve a similar layout without relying heavily on background properties: