0
How to Use CSS in aligning buttons to the a particular side or Center
I have been trying to get a button aligned to the center but couldn't figure it out.
5 Antworten
+ 2
That's probably not the best way, but you can use the following code, it will align the button to center:
button {
width: 20%;
margin-left: 40%;
}
+ 1
Use margins to align your button in center.
+ 1
Thank you guys
Really appreciate it
Will try those
Regards: Binkap S
+ 1
Thanks
Lovely
0
Alternatively, instead of using CSS, you could put your button inside a div and align the div to the center normally with the HTML align="center" attribute.