+ 3

How to show body of html on middle screen?

I want to show my html body in middle of computer screen only How to do it? please explain...

12th Oct 2021, 6:06 AM
Shivam Tiwari
Shivam Tiwari - avatar
3 Respostas
+ 2
body{ position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) }
12th Oct 2021, 9:04 AM
Sancho Godinho
Sancho Godinho - avatar
+ 2
Use css .
14th Oct 2021, 2:59 AM
Ahmed Mohammed
Ahmed Mohammed - avatar