Answer the question
In order to leave comments, you need to log in
How to make items split into two columns?
Let's say I add some elements like:
<div>item1</div>
<div>item2</div>
<div>item3</div>
<div>item4</div>
Answer the question
In order to leave comments, you need to log in
Method 1 . Flex container with flex-wrap: flex property and width:50% divs.
If the elements will have borders or paddings, then use box-sizing: border-box, or the width is calculated smaller.
https://jsfiddle.net/byvo7524/1/
Method 2 . CSS property column-count: 2 for the parent of the divs.
<div class="wrapper">
<div>item1</div>
<div>item2</div>
<div>item3</div>
<div>item4</div>
</div>
.wrapper {
column-count: 2;
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question