In the JSfiddle provided below, you can see that after a click event occurs, two span (block) elements rotate 45deg to form an "X". However, both elements are slightly shifted left, creating an off-center "X" relative to the parent's true center-origin.
I am looking for a solution to ensure that my "X" forms in the parent's true center. I have searched extensively but haven't been able to find a satisfactory answer. Any help would be greatly appreciated.
Currently, I'm using the following "transform-origin" to create the "X" after the click event:
transform-origin: 21% 50%;
Things become chaotic without this line of code.
You can view the JSfiddle here: https://jsfiddle.net/STEEZENS/L74p1ok3/
HTML
<a href="#" id="hamburger-icon" title="Menu">
<span class="line line-1"></span>
<span class="line line-2"></span>
<span class="line line-3"></span>