-1

is there a way to automatically address the last or first item of a column in a flexbox container? I would like the items to have a division line like this: flexbox items with division lines

The last one in each column should not have a border-bottom.

It's not a problemn to do it "manually" with nth-of-child, but items will constantly be added or removed, so I'm looking for a more elegant way to solve this. Something like".flex-item:last-in-column".

Asons
  • 84,923
  • 12
  • 110
  • 165
Sigi
  • 41
  • 2

1 Answers1

1

No

A similar problem exists with flexbox: there are no selectors for matching specific flex items based on how they are laid out. In general, there are no selectors matching elements based on their layout as governed by CSS. Selectors only match elements based on document semantics (source order, etc).

BoltClock in this Q&A

Community
  • 1
  • 1
Paulie_D
  • 107,962
  • 13
  • 142
  • 161