button turn sideways anchor

I have a button that I am quite content with, and it animates well. However, I wish to rotate it 90 degrees to have it face down instead. I used transform: rotate(90deg);. However, this sorta skews it and the button moves to the right when hovered. Can anyone help? Here is my code:

Rotate line around center point given two vertices

I’ve been trying to rotate a bunch of lines by 90 degrees (that together form a polyline). Each line contains two vertices, say (x1, y1) and (x2, y2). What I’m currently trying to do is rotate around the center point of the line, given center points |x1 – x2| and |y1 – y2|. For some reason (I’m not very mathematically savvy) I can’t get the lines to rotate correctly.