The screenshot is at iPhone 6+ size, but once this goes off the the client the actual sound clip names will be longer and more varied. I need the bottom box to line up. This is my HTML
The whole area must be clickable. At this point what I need to figure out is how to get the boxes at the bottom to be the same height on a given row, with text vertically centered, regardless of how many lines the largest box has. Everything I tried last night wouldn’t work - I could get the container to be the same height, but never the children.
To add the challenge, unless the html is changed there are no more :before / :after psuedo elements available - they are occupied making those tiny yellow corner marks in the design. They are absolutely positioned, and as a result the li, a and span tags are all set position: relative so they will go to their correct locations.
I’d probably do display:table-cell for this. Easily get equal heights and if you apply it to the anchors, the entire box will be clickable. From there, vertical alignment is simple. Any particular reason you are using flex?
Either way, we can’t do anything without a codepen/jsfiddle/site. Or a minimum, the CSS.
The exact number of cells is not known, and the number of cells per row changes by device width, rendering table layout impossible.
I can compose a jsfiddle, but it will take awhile. I have other projects of higher priority today, and the surrounding page has a lot of “noise” that I need to strip to get down to the problem at hand.
Flexbox is about the only way to do this automatically when you need rows that wrap and still stay the same size compared to the other items in the row.
I did mess about with this a couple of years ago but only go but it only really worked in Firefox and was to convoluted to use for real.
The only other option is to arbitrarily give a min-height to all the boxes and hope it fits most cases…
What was up there didn’t work but it did point me in the correct direction to reach something that did work - mostly. So for that I am very, very thankful.
What still isn’t working is Firefox - the design I arrived at breaks in Firefox’s implementation of Flex. I can’t reveal the site until it launches which will be in a few days, and it’s going to launch with flex only on the browsers that understand the -webkit prefix. At that time I’ll provide a URI to the page along with a local stylesheet to reactivate flex on Firefox (basically just pull all the webkit prefixes) and see if anyone else can figure out what’s going wrong.