Follows a model with float
as you wanted, the problem is that with float
the height of the box on the left is not equal to the height of the boxes on the right, if you want to adjust this you have to for a hand value. Besides, you need to make one clearfix
, for the text that comes after the container
don’t fit with the top boxes...
Follow a basic example.
html, body {
width: 100%;
height: 100%;
margin: 0;
padding: 0;
}
.container::after {
content: "";
clear: both;
display: table;
}
.box {
border: 1px solid #000;
box-sizing: border-box;
width: calc(50% - 20px);
margin: 10px;
float: left;
}
.box.n2,
.box.n3 {
float: right;
}
<div class="container">
<div class="box n1">n1</div>
<div class="box n2">n2</div>
<div class="box n3">n3</div>
</div>
<p>
Lorem ipsum dolor, sit amet consectetur adipisicing elit. Molestiae, quam soluta necessitatibus sapiente error laudantium illum, fuga veritatis veniam quibusdam obcaecati voluptatem in aspernatur eum sequi! Ducimus mollitia eos excepturi.
</p>
<div class="container">
<div class="box n1" style="height: 60px;">n1</div>
<div class="box n2">n2</div>
<div class="box n3">n3</div>
</div>
Now an option with Flex
if you care. Here the children will follow the height of the brother next to.
Follow the image code above
html, body {
width: 100%;
height: 100%;
margin: 0;
padding: 0;
}
.container {
display: flex;
flex-wrap: wrap;
}
article {
border: 1px solid #000;
box-sizing: border-box;
width: 50%;
}
article.coluna {
display: flex;
flex-direction: column;
}
.box {
border: 1px solid #000;
box-sizing: border-box;
}
.box.n2,
.box.n3 {
flex: 1;
}
<div class="container">
<article>
<div class="box n1">Lorem ipsum dolor, sit amet consectetur adipisicing elit. Asperiores ea debitis cum illum perferendis labore voluptates at magni omnis unde?Lorem ipsum dolor sit amet consectetur adipisicing elit. Eos, nesciunt. Recusandae rerum tempora reprehenderit officia odit! Alias ipsam voluptates veniam officiis laboriosam et odit, ullam molestiae nihil, officia consequatur. </div>
</article>
<article class="coluna">
<div class="box n2">n2</div>
<div class="box n3">n3</div>
</article>
</div>
<p>
Lorem ipsum dolor, sit amet consectetur adipisicing elit. Molestiae, quam soluta necessitatibus sapiente error laudantium illum, fuga veritatis veniam quibusdam obcaecati voluptatem in aspernatur eum sequi! Ducimus mollitia eos excepturi.
</p>
What do you mean underneath? totally covered up by the second? It has an image of the layout you want to make?
– hugocsl
@hugocsl edited the question with a picture of what I want
– Bruno
It has to be with Float or it can be something else like flex or grid?
– hugocsl
@hugocsl can be flex or grid type
– Bruno
I’ll see if I can make a flex option to help you too
– hugocsl