Reputation: 29
I am trying to center a button. At first sight the buttons seems centered. However when the screen size gets smaller the button is more to the right. I already tried to use text-align: center; etc. But that does not work. I really can not figure out what causing this problem. I had another button container and i have not problems with that one. Below the link to codepen. Solutions are welcome. Thanks.
https://toffewebsite.nl/example.html
Upvotes: 0
Views: 44
Reputation: 796
Use
display:flex;
justify-content:center;
align-items:center;
If you want only one button to be in the center,then use this https://codepen.io/the-wrong-guy/pen/GRoMNmg?editors=1100
Upvotes: 1