Is there a way to determine if a DIV is within its container and therefore visible?
In this scenario, the active button (highlighted) can be seen because it is contained within the boundaries:
However, in this case:
The active button cannot be viewed as it lies outside the borders of its container with overflow: hidden
. I am looking for a solution to remove buttons starting from 1 until the active button becomes visible within the container. Any suggestions on how to detect the visibility of the active div would be greatly appreciated.