Here is a kind of rough picture of what I'm trying to do. If he doesn’t explain it well enough, I can throw the violin together.

The black box is <div>, and the pink ones are also a div. I want them to look like tabs. Therefore, when it is active, it closes the border of the parent, giving the effect of a "bridge", which is important for tabs.
I thought I could just make the active a little wider so that it cuts the border. The problem is that if I have overflow-x: hidden;, then the wider part is under the “black outline”, and if I do it automatically or visibly, it just allows it to scroll.
One important thing: pink must have a relative position.
What am I doing wrong?
EDIT: . overflow-y: hidden. , , ,