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

269
Views
Flexbox items overlap when resizing window

I'm creating a landing page with 3 sections (I haven't coded the 3rd section yet).

Each section must occupy 100% of the screen.

The top 2 sections have 2 columns each.

I'm using Flexbox for this, and everything looks great as long as the browser is full screen and the sections have no content. When I start adding content inside the sections, then resize the window, the sections start to overlap, especially when resizing only vertically.

When resizing horizontally there is no problem as I can change flex-direction:column; to flex-direction:row; for them to stack.

How can I get a 100% view of the section while making everything responsive when the window is resized and avoid overlapping?

Would CSS Grid be a better option here?

Here is a Code Pen. Slide the code panel up, then resize your window, and you'll notice how the second section overlaps the first section's button, text, and image. Code Pen: https://codepen.io/MarwanAK10/pen/eYedLoZ

If you try to remove the button, paragraph and image from the html, the problem will go away and when you resize the sections won't overlap...

Thanks!

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

You can use @media queries for screens of different sizes. So you can display everything differently depending on the size of the screen. You can see the documentation here

over 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!