When I hover on top of #empresas is not affecting the height of the #personas div. Why's that?
HTML
<div id="hugeBanners">
<div id="personas">
<h3 class="personasText1">Servicios Para ti</h3>
</div>
<div id="empresas">
<h3 class="empresasText1">Servicios Para tu Empresa</h3>
</div>
</div>
CSS
#personas {
width: 100%;
height: 40%;
position: absolute;
top:20%;
background-color: green;
cursor: pointer;
transition: height 0.2s ease;
}
#personas:hover {
height: 70%;
}
#personas:hover ~ #empresas {
height: 10%;
}
#empresas {
width: 100%;
height: 40%;
position: absolute;
bottom: 0;
background-color: aqua;
cursor:pointer;
transition: height 0.2s ease;
}
#empresas:hover {
height: 70%;
}
#empresas:hover ~ #personas {
height: 10%;
}
What's happening because when you hover on top of #personas it works perfectly, resizing the height of #empresas.