I'm trying to make 4 circles appear when the central circle is clicked, much like
However, when I resize the viewport, the position of the divs change, as shown in the code below. I tried making the position relative, but that doesn't work. https://codepen.io/Refath/pen/NJbEQO
Here's the code in question:
.subOne{
position: relative;
top: -200px;
left: 445px;
}
.subTwo{
position: relative;
top: -650px;
left: 445px;
}
.subThree{
position: relative;
top: -570px;
left: 255px;
}
.subFour{
position: relative;
top: -670px;
left: 650px;
}
One idea I had was to wrap the subcircles in a seperate container div, and translate the container based on the viewport, although I'm not sure how feasible that would be.