Quantcast
Channel: Active questions tagged flexbox - Stack Overflow
Viewing all articles
Browse latest Browse all 1323

How to vertically center the content section of a PrimeVue Panel?

$
0
0

I am using the PrimeVue Panel element and tailwind.

I want the content area to be vertically centered. I do not want the header to change, only the content area.

I have tried putting flex items-center justify-center on the inner div but it doesn't vertically center.

<Panel header="Keep This Heading Here"><div class="flex items-center justify-center">Make this vertically centered</div></Panel>

I have also tried adding it to the content class as a pass through but it still doesn't vertically center.

<Panel header="Keep This Heading" pt:content:class="flex items-center justify-center"><div>Make this vertically centered</div></Panel>

Here is a live minimal reproduction: https://stackblitz.com/edit/bqzl55-dakehh?file=src%2FApp.vue

How can I make this work?


Viewing all articles
Browse latest Browse all 1323

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>