I want to center both boxes (and overlapping) in the middle of the screen without using a fixed width and height.
At the end I want to use CSS transitions to make box 1 disappear and show box 2 instead (after clicking a button).
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.3.1/css/bootstrap.min.css" />
<div class="container w-100 bg-dark" style="height: 400px;">
<div class="d-flex justify-content-center align-items-center bg-light h-100">
<div class="bg-white px-4 py-4 rounded shadow" style="z-index: 1">
<p>
Box 1
</p>
</div>
<div class="bg-white px-4 py-4 rounded shadow" style="z-index: 2">
<p>
Box 2: More Content <br>
Lorem Ipsum
</p>
</div>
</div>
</div>