How do you align a button? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How do you align a button?

How to you align an button input?

30th Nov 2016, 5:58 AM
KidCoder
KidCoder - avatar
1 Answer
+ 2
Place a button : <div class="buttonTxt"> <button class="button">Button</button> </div> Using CSS , do this : .buttonTxt { text-align: center; } .button { position: absolute; top: 50%; } The above code makes the button appear at the center of the page, change the position inside the CSS to make it appear somewhere else.
30th Nov 2016, 6:24 AM
Wen Qin
Wen Qin - avatar