Is there a way to create two columns without changing the HTML structure? The content within each child element is dynamic, so there needs to be dynamic vertical spacing as well. I'm experimenting with different CSS properties for both the parent and child elements to achieve this.
.parent{
}
.child{
display:flex;
float:left;
width: 48%;
padding: 3px;
border: 1px solid red;
background-color: gray;
}
/** Ignore below */
.child1{
background-color: green;
}
.child2{
background-color: blue;
}
.child3{
background-color: darkblue;
}
.child4{
background-color: lightgreen;
}
.child5{
background-color: yellow;
}
.child6{
background-color: #989898;
}
.child7{
background-color: #545454;
}
<div class="parent">
<div class="child child1">Child 1 text here Child 1 text here Child 1 text here Child 1 text here
</div>
<div class="child child2">Child 2 text here Child 2 text here Child 2 text here Child 2 text here Child 2 text here Child 2 text here Child 2 text here Child 2 text here Child 2 text here Child 2 text here Child 2 text here
</div>
<div class="child child3">Child 3 text here Child 3 text here Child 3 text here Child 3 text here Child 3 text here Child 3 text here
</div>
<div class="child child4">Child 4 text hereChild 4 text hereChild 4 text hereChild 4 text hereChild 4 text hereChild 4 text hereChild 4 text hereChild 4 text hereChild 4 text hereChild 4 text hereChild 4 text hereChild 4 text hereChild 4 text hereChild 4 text hereChild 4 text hereChild 4 text hereChild 4 text hereChild 4 text hereChild 4 text hereChild 4 text hereChild 4 text hereChild 4 text hereChild 4 text hereChild 4 text hereChild 4 text hereChild 4 text hereChild 4 text hereChild 4 text hereChild 4 text hereChild 4 text hereChild 4 text hereChild 4...
</div>
<div class="child child5">Child 5 text here Child 5 text here Child 5 text here Child 5 text here Child 5 text here Child 5 text here Child 5 text here Child 5 text here Child 5 text here Child 5 text here Child 5 text here Child 5 text here Child 5 text here Child 5 text here Child 5 text here Child 5 text here Child 5 text here Child 5 text here Child 5 text here Child 5 text here
</div>
<div class="child child6">Child 6 text here Child 6 text here Child 6 text here Child 6 text here
</div>
<div class="child child7">Child 7 text here
</div>
</div>