Why do text is not appearing on the center | Sololearn: Learn to code for FREE!

+2

Why do text is not appearing on the center

https://code.sololearn.com/WBEJRatnGttZ/?ref=app

8/9/2022 11:39:59 AM

Saddam Hussain

7 Answers

New Answer

+7

you should follow proper indentation that is :- proper use of head tag, title tag , body tag , html tag Because those are advised to use for every web codes

+2

div label:before{ width:35px; height:35px; background-color:#eee; display:flex; position:absolute ; content:"OFF"; top:50%; transform:translateY(-50%); border-radius:50px; left:3px; transition:.4s; align-items:center; justify-content:center; }

+2

That will get the text to the center. I change it to a flex container

+2

Saddam Hussain you are welcome

+2

Suparna his question was on centering the text not the toggle button

+1

Baribor Saturday thank you so much........

+1

You can as well use make the display:grid; then edit it in such a way that it will be in the center Or Margin life-hacks 😂