If you just want them to show side by side you can add display: flex
to the categories div, as following:
#categories{
display: flex;
-webkit-column-count: 4;-moz-column-count: 4;column-count: 4;
-webkit-column-gap:1em;-moz-column-gap:1em;column-gap: 1em;
}
The default for flex is to display as a row (re: horizontal).
Check out this link for more info: https://developer.mozilla.org/en-US/docs/Web/CSS/flex
Edit:
I think that using grid might be better for your problem.
if you try something along these lines it should work:
#categories{
-webkit-column-count: 4;
-moz-column-count: 4;
column-count: 4;
-webkit-column-gap:1em;
-moz-column-gap:1em;
column-gap: 1em;
display: grid;
grid-template-rows: repeat(auto-fit, minmax(80px, 1fr));
grid-auto-rows: 80px;
grid-auto-flow: dense;
}
.item{
display: inline-block;
margin: 0 0 1em;
padding:1em;
width: 100%;
border:3px solid #fff;
border-radius: 30px;
height:100px;
}
.item p{color:#59a3b6;text-align:center;font-weight:500;}
#categories .item:nth-child(1n+2){
height:200px;
grid-row: span 1;
grid-column: span 2;}
#categories .item:nth-child(2n){height:250px; grid-row: span 2; grid-column: span 1;}
#categories .item:nth-child(3n){
height:120px;
grid-row: span 4;
grid-column: span 4;
}
#categories .item:nth-child(4n){
height:140px;
grid-row: span 1;
grid-column: span 1;
}
#categories .item:nth-child(5n){
height:300px;
grid-row: span 3;
grid-column: span 6;
}
Basically I added display: grid;
to the parent item, and then grid grid-row: span 1; grid-column: span 2;
to the children. You'll still have to play around with it, but it should get you along the way to what you want.
Follow this video, she does a great job explaining the concept.
Hope this helps, good luck!