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

144
Visualizações
Set the max height of one child div as the height of another child of the same parent div

The div structure is -

<div class="parent">
    <div class="left float-start"></div>
    <div class="right float-end overflow-y"></div>
<div>

Now,

  1. For the left child -

    • the height should be based on dynamic content
    • displayed entirely with no overflow scroll
  2. For the right child -

    • height is also based on dynamic content but
    • max height should be the height of the left child
    • set to overflow-y scroll and so it's never longer than the left child but can be shorter

How do i do this only using css?

Any help would be appreciated!!

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

@Ashley you can use this css for this problem.

<div class="parent">
    <div class="left float-start"></div>
    <div class="right float-end overflow-y"></div>
<div>

// For equal height of the div CSS:-

.parent {display: flex;}

/***** for mobile view *****/

@media (max-width: 767px) {.parent { flex-wrap: wrap;}}

// this is break the column according to the width of the div

about 4 years ago · Juan Pablo Isaza 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