I have some divs that have different heights and I don't know how to align them at the bottom instead of at the top using the FLOAT property.
I pass example of what I have
#marcas {
width: 100%;
height: 300px;
display: block;
position: relative;
}
#marcas #contMarcas {
width: 100%;
background: red;
position: absolute;
height: 100%;
}
#marcas figure#der {
width: 30%;
height: 90%;
background: yellow;
text-align: right;
position: relative;
float: right;
}
#marcas figure#izq {
width: 30%;
height: 50%;
background: green;
position: relative;
float: right;
}
<section id="marcas">
<div id="contMarcas">
<figure id="der"> </figure>
<figure id="izq"> </figure>
</div>
</section>
The idea is that both rectangles are aligned below maintaining float. Thank you
Using
flex-box
I have built an example that apparently behaves like yours, just with the specification you need. (bothfigure
aligned by the base).The use of
float
inevitably approaches its obsolescence, currently others are useddisplay
that give us what it gave usfloat
and many other things. (seedisplay: flex
ordisplay: grid
).