<div class="div1">
<button>button1</button>
</div>
<div class="div2">
<button>button2</button>
</div>
div {
margin-bottom: 20px;
border: 1px solid red;
}
.div1 {
text-align: center;
}
.div2 button {
display: block;
margin: auto;
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.