Answer the question
In order to leave comments, you need to log in
How to get to the last element in a string?
Of course it's flexbox with wrapping
Number of elements unknown
Currently the extremes are : 2 4 8 10
If you add then the layout will change
Is it possible to get to every last element of the row ?
https://codepen.io/topicstarter/pen/bOQyKm here is all the crap
The question I had was born from here
Answer the question
In order to leave comments, you need to log in
On js, you can simply compare the offsetLeft of an element with the offsetLeft of the next one, if more, then this is the last one in the line.
Something like this:
https://codepen.io/anon/pen/aPPbGV
Not with state funds. With pens, you type the code in js, which will check how the elements fit by adding their width and comparing it with the width of the container, do not forget to take into account the padding of the elements and the container. All dare, you can even share the result.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question