+ 5

How to center a button

How can I center a button? (A code example would be awesome) https://code.sololearn.com/W5sSHi0puVlR/?ref=app

22nd May 2018, 5:30 PM
🐺Michael🐺
🐺Michael🐺 - avatar
4 ответов
+ 1
https://code.sololearn.com/WwLB56QJ7503/?ref=app
22nd May 2018, 5:44 PM
᠌᠌Code X
᠌᠌Code X - avatar
+ 4
Brains Thank you!!!
22nd May 2018, 5:58 PM
🐺Michael🐺
🐺Michael🐺 - avatar
+ 3
166239 Thank you, but Brains already answered excellently. He showed me how to use a <center> tag. Thanks anyway!
28th May 2018, 1:56 PM
🐺Michael🐺
🐺Michael🐺 - avatar
+ 2
You can style it with CSS, or use a shorthand attribute on a div tag like this: <div align=“center”> <input type=“button” value=“Click Me!”> </div>
28th May 2018, 1:47 PM
166239