Physical Address
304 North Cardinal St.
Dorchester Center, MA 02124
Physical Address
304 North Cardinal St.
Dorchester Center, MA 02124
If you need to flex grid 2 columns in CSS then you definately want three (3) div
s.
Create some HTML with this format.
<div class="Guardian">
<div class="child1">
<h1>Left</h1>
</div>
<div class="child2">
<h1>RIGHT</h1>
</div>
</div>
Create a Guardian
div that makes use of the Flexbox show mannequin.
.Guardian {
show: flex;
flex-direction: row;
}
Create two (2) divs which are each 50% of the dad or mum container.
Under we set the peak to 100% of the viewport top.
.child1 {
width: 50%;
top: 100vh;
background-color: inexperienced;
}
.child2 {
width: 50%;
top: 100vh;
background-color: pink;
}
You also needs to set the padding and margin to “ to verify there is no such thing as a overlap.
.physique {
padding: 0;
margin: 0;
}
It’s also good observe to set the border-box
as follows:
box-sizing: border-box;
A very good total strategy to set these are as follows:
* {
box-sizing: border-box;
padding: 0;
margin: 0;
}