Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

151
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!