I have a parent container with two child elements inside. I want the first child to align to the left side and the second child to align to the right side, but not starting from the exact center point. They should be positioned slightly off-center by -100px and +100px respectively. From that starting point, they should fill the remaining width of their respective sides of the screen. Additionally, when the window is resized, they should remain in the same position relative to the center, minus the defined X amount of pixels.
Here's an example of what my code currently looks like:
<div className={classes.backPartDivs}>
<div />
<div />
</div>
backPartDivs: {
width: '100%',
position: 'absolute',
top: 0,
zIndex: 4,
left: 0,
height: 68,
'& > div': {
'&:first-child': {
position: 'absolute',
left: 'calc(-50vw + 50%)',
height: 68,
width: '100%',
backgroundColor: 'red',
boxShadow: theme.shadows[18],
},
},
},