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

152
Vistas
CSS modal doesn't take parent's full height

I want the popup modal to take full height, but it doesn't when there's some overflow.

The popup is shown once the user clicks a card. Below, there're images of the behaviors if the user clicks a cards when there's no scroll vs when there's scroll.

The parent section is set to relative and the child modal is set to absolute.

I'm using TailwindCSS and VueJS frameworks.

Parent

<section id="dashboard" class="flex flex-col relative w-full h-full">
    <!-- Cards and stuff -->
    <div class="flex flex-col flex-auto w-full min-h-min px-5 py-10">
        ...
    </div>
    <!-- Modal popup -->
    <SummaryPopUp v-if="popup" @popUp="toggle_popup"/>
</section>

Child [Popup]

<div class="absolute flex flex-col w-full h-full justify-center place-items-center bg-gray-400">
    <!-- Close button -->
    <button type="button">
    </button>
</div>

Parent height vs Child modal height

enter image description here

enter image description here

Not scrolled vs Scrolled

enter image description here

enter image description here

about 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

Is there any reason you are not using position: fixed; instead of absolute ?

Since modal is a popup, there is no reason for it to be absolute to anything, since it will overlay the screen and in your case, cover everything.

about 4 years ago · Santiago Trujillo 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