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

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

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