I've looked all across this site (and the rest of the internet), and the only question which actually mentions vertically centering two or more is this one, but the only answer there seems to just be an entire code review. In the process of learning CSS, I still cannot reliably position things centrally in the order I want them. Horizontally centering is often just as difficult, although I've managed in the minimal code example below. I know of howtocenterincss.com but that only lets me align one thing vertically.
In the following code example, I want the two buttons collectively to be centered in the div, arranged one above the other, with a margin in between them. I've managed to get half way there, but can't quite figure out how to align them vertically within the div.
#buttonContainer {
display: inline-block;
border: solid 3px black;
width: 400px;
height: 400px;
}
.button {
display: block;
margin: auto;
}
<div id="buttonContainer">
<button id="b1" class="button">Button 1</button>
<button id="b2" class="button">Button 2</button>
</div>