Burhan Gül Burhan Gül - 13 days ago 10
CSS Question

How do I center buttons in my div?

How do I center buttons in my div at png?

words.png

Answer

just assigned its container text-align: center;

div{
  text-align: center;
  border: 1px solid red;
  padding: 10px;
}
<div>
  <button>aaa</button>
  <button>aaa</button>
  <button>aaa</button>
  <button>aaa</button>
</div>