0

enter image description here

<div class="row justify-content-center pt-5">
    <div class="col-sm-8">
        <div class="card bg-light w-auto">
            <div class="card-header" th:text="${post.title}"></div>
            <div class="card-body" style="height: 2rem">
                <p class="card-text" th:text="${post.author}"></p>
            </div>
        </div>
    </div>
</div>

After adjusting the height of the card, I want to vertically align the text("testNickname" -> ${post.author}) accordingly, but I can't find a way. Any help would be appreciated.

I also tried adjusting the padding or margins, but it didn't work.

Joshep
  • 35
  • 5
  • You can solve this with one of the solutions provided in the duplicate question (eg. by applying a flexbox styling). Be aware that you currently have more padding than what your height allows, so ideally you disable the vertical padding entirely. – g00glen00b Jul 19 '23 at 13:38

0 Answers0