comrades.
I need to show a list of few elements with unknown width and number of elements, there a separators between items also. It can be few rows, or can not to be.
I use a flexboxed <ul>
with flex-wrap and make separators with <li>
`s border-left.
I need to hide separators of first item of each row if row was wrapped to few rows.
ul {
display: flex;
flex-wrap: wrap;
justify-content: center;
}
li {
flex: 0 0 auto;
border-left: 1px solid red;
}
li:first-child { /* here i need something like ul:flex-row li:first-child */
border-left: none;
}
html
<ul>
<li>Item 1</li>
<li>Item 2</li>
<li>Item 3</li>
<li>Item 4</li>
<li>Item 5</li>
</ul>
Does there exist the solution of this task with css?
Or only thing i can use is js, like offset().top
changes of <li>
s parsing and adding modifier-classname?
Thanks ahead.
`.
– Mike Polo Apr 03 '19 at 10:50