Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

450
Vistas
How to fix in Tailwindcss div height overflows parent div

My card element has a fixed height of h-80 (in Tailwind). usually I use the card in a grid.

Now, I have a div inside that card, which is bigger than it's parent div, however I want it to scroll vertically. The problem becomes now, that I can not scroll completly down. The last line is cut off.

Overflow auto, but not completly scrollable: Overflow-auto but not to the end

Full height to see what content is missing: Full height to see the full content

I am using VueJS as framework, this is my Card component:

  <div class="w-full overflow-hidden h-full px-3 py-2">
    <div v-if="title" class="block text-gray-700 text-lg font-semibold py-2 px-2">
      <i :class="title_icon" />
      {{ title }}
    </div>
    <div class="h-full overflow-y-auto">
      <slot>
        <-- Here is another component which holds the appointments-->
      </slot>
    </div>
  </div>

How do I fill the remaining space in a div with overflowing content in TailwindCSS?

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Use the flex-grow property on the sub-div to allow it to grow. Set flex on the parent div and flex-col to keep the styling. Find the documentation here

  <div class="flex flex-col w-full overflow-hidden h-full px-3 py-2">
    <div v-if="title" class="block text-gray-700 text-lg font-semibold py-2 px-2">
      <i :class="title_icon" />
      {{ title }}
    </div>
    <div class="flex-grow h-full overflow-y-auto">
      <slot>
        <-- Here is another component which holds the appointments-->
      </slot>
    </div>
  </div>

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda