How to centre using css? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How to centre using css?

I want to make a static web page to look like this: https://miro.medium.com/max/1400/1*7zTYsEk1Le_PiQrq2xJHBA.png but I don't know how to centre things using css This is my code: https://code.sololearn.com/W4OW8BX20mWG/?ref=app

19th Jun 2020, 11:04 AM
Lunu'anaki
Lunu'anaki - avatar
3 Answers
+ 2
use table td:first-child { text - align : left } td:last - child { text - align :right }
19th Jun 2020, 12:29 PM
Gordon
Gordon - avatar
+ 1
Make a habit, try not to use <br> in any css styling, use div or any block element instead. https://code.sololearn.com/WQaNI77Ny7gg/?ref=app
19th Jun 2020, 2:17 PM
Calviղ
Calviղ - avatar
0
form{ text-align: center; } add align center to your css
19th Jun 2020, 12:21 PM
Sudarshan Rai
Sudarshan Rai - avatar