0

How can I position a word in the middle of a page?

I want to position the word "CSS" in the middle of the page. How can I do it?(irrespective of size of view-port)

17th Jul 2020, 5:36 PM
Abhishek Kudlur
5 Respuestas
+ 1
display:flex; align-items:center; justify-content:center;
17th Jul 2020, 7:03 PM
Logomonic Learning
Logomonic Learning - avatar
+ 1
Abhishek Kudlur yup I know ,if you are looking to middle the text Logomonic Learning solution works fine ,but you need to provide a height to whatever container you will apply those properties to, Or you could also do something like this for centering text body{ height:300px; } div{ margin:auto } body here is representing parent container whose child is div element
18th Jul 2020, 7:32 AM
Abhay
Abhay - avatar
0
text-align: center
17th Jul 2020, 6:03 PM
Abhay
Abhay - avatar
0
Abhay this will make text appear in the middle of the line. What I want is it should be in the middle of the page.
18th Jul 2020, 2:37 AM
Abhishek Kudlur
0
Logomonic Learning thanks.. but that doesn't make the text appear in center of the page. It just appears in middle on the top of the page
18th Jul 2020, 2:37 AM
Abhishek Kudlur