Can't figure out why my images are sideways[CLOSED]

I have a Tic-Tac-Toe game almost complete I just can’t seem to figure out why my images that replace X and O are showing up in random directions like sideways and upside-down if anyone can help.

Thanks,
Ty

It might be because of these lines:

    var rand = Math.random();
    if (rand < 0.3) {
        document.getElementById(id).style.transform = "rotate(180deg)";
    } else if (rand > 0.6) {
        document.getElementById(id).style.transform = "rotate(90deg)";
    }

I found two of these in your code.

Removed the code but no luck, thanks anyway

I just checked your code pen, and the @kevcomedia mentioned is still in your project and still causing the sideways and upside down police light.

Yea I found it somewhere else too and just removed it and now it’s working. Thanks, folks!

If you did not want to turn the image random positions, why did you put it into your solution in the first place?

originally It was X’s and O’s that looked animated and the rotation changed on it just to change the style up a bit

I see. Glad you got it sorted out.