enter image description hereIs there a way to achieve the same space vertically for all child elements with regard to the element above and below as seen in the image?
Here is my code:
<code><div class="text-white bg-success d-flex justify-content-center flex-column align-items-center" style="padding: 1rem">
<h5 style="margin-bottom:0">Test Test Test</h5>
<div>Test Test Test</div>
<button id="button" class="btn btn-primary">Test</button>
</div>
</code>
<code><div class="text-white bg-success d-flex justify-content-center flex-column align-items-center" style="padding: 1rem">
<h5 style="margin-bottom:0">Test Test Test</h5>
<div>Test Test Test</div>
<button id="button" class="btn btn-primary">Test</button>
</div>
</code>
<div class="text-white bg-success d-flex justify-content-center flex-column align-items-center" style="padding: 1rem">
<h5 style="margin-bottom:0">Test Test Test</h5>
<div>Test Test Test</div>
<button id="button" class="btn btn-primary">Test</button>
</div>
I tried padding, margins and experimenting with different flex classes but no success. I would appreciate your support!
New contributor
funnyguy is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.