+ 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

13th Sep 2021, 6:27 PM
CodeSmith
CodeSmith - avatar
2 Respuestas
+ 1
element{ position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); }
15th Sep 2021, 9:41 AM
Sancho Godinho
Sancho Godinho - avatar