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

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

#1

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


#2

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.


#3

Removed the code but no luck, thanks anyway


#4

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.


#5

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


#6

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


#7

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


#8

I see. Glad you got it sorted out.