Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

157
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda