Well, I'm doing a site where in the home there are 4 modules, the first two have to be one underneath the other, so alright, except that the third module has to be next to these two as if it were a column, First I thought I'll put a div around the two and it worked, but then there was another problem, the 4 module would have to stay below the 1 and 2 only in the layout I received, the mobile version is in that order where the 4 module has to be underneath the non-mobile version column, so my question is:
- In the version where I create a div to wrap the first two modules, how do I make the 4 module fill the empty space?
In the version where I do not create a div to wrap the first two, there is a way for the first two to be underneath each other the 3 next to the two and the 4 occupying the empty space below the first two ?
Remembering that I'm using FLEX-BOX but if you have a better alternative I accept suggestions.
I will put an image to illustrate how it should be
FINALSOLUTION
InsteadofusingflexboxIusedthefloatpropertyevenasfollows:
CSS
.pai{float:left}Larguraqualquer.pai.mod{width:704px;float:left;}Envolveomódulo1e2().pai.modulo3{width:296px;float:right;}Mod3ocupaoladodireito.pai.modulo4{width:704px;float:left;}Ocuparáoespaçovazio
HTML
<divclass="pai">
<div class="mod">
<div class="modulo1"></div>
<div class="modulo2"></div>
</div>
<div class="modulo3"></div>
<div class="modulo4"></div>
</div>