The issue lies with the CSS property position: relative;
applied to .megadiamond
.
By using position
and a negative value for top
, your elements are being positioned on the page in a way that affects their height.
Consider changing them to position: absolute;
so they are moved to the top without impacting the page's layout as before.
However, there may still be some residual scrollbar due to the rotation of your element causing extra space to be taken up. Adding overflow: hidden;
might help alleviate this issue.