Grid columns with list tags, I need to display in correct order per every 3 columns, with auto width enabled for every extra HTML list elements.
This is my example:
<style>
ul {
margin: 0;
padding: 0;
display: -webkit-flex;
display: flex;
-webkit-flex-wrap: wrap;
-ms-flex-wrap: wrap;
flex-wrap: wrap;
-webkit-flex-direction: column;
-ms-flex-direction: column;
flex-direction: column;
height: 150px;
width:auto;
}
li {
float: left;
display: inline-block;
list-style: none;
position: relative;
height: 50px;
width: 50px;
}
</style>
<ul>
<li>1</li>
<li>2</li>
<li>3</li>
<li>4</li>
<li>5</li>
<li>6</li>
<li>7</li>
<li>8</li>
<li>9</li>
<li>10</li>
<li>11</li>
<li>12</li>
</ul>
display: -webkit-flex;
.
I want to convert the output like this:
1 4 7 10
2 5 8 11
3 6 9 12
It's important I get this working for Safari browser so far I cant seem to solve this problem at all, I would appropriate any help :)
Test link: