+ 1
Hello guys, help me align my canvas element to the center of the page.
and also to resize it according to the screen size. I have tried using transform property but it doesnt seem to work plz help. https://code.sololearn.com/Wt4qd8xv58sm/?ref=app
2 Answers
+ 1
element{
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}