I am attempting to duplicate the following screenshot:
https://i.stack.imgur.com/HJwou.png
Where the background image sits between two separate colored divs. I have attempted to use absolute positioning, but the issue I run into is the image covers text and other divs, etc. Any and all guidance would help immensely on how to achieve this. A minimal example would be the following code:
<div style={{ positon: "relative", zIndex: 0 }}>
<div style={{ backgroundColor: "red", height: 500, width: "100%" }}></div>
<div
style={{ backgroundColor: "blue", height: 500, width: "100%" }}
></div>
<div
style={{
backgroundRepeat: "no-repeat",
backgroundPosition: "cover",
backgroundImage: `url(${Squiggle1})`,
height: 600,
width: 451,
position: "absolute",
top: 250,
bottom: 0,
right: 0,
zIndex: -1
}}
/>
</div>
attached is a code sandbox for debugging: https://codesandbox.io/s/empty-sunset-tchcup?file=/index.css