r/css • • 29d ago

Question Bootstrap Timeline

I have this nicely formatted timeline aesthetic, but it has one bug I cannot seem to figure out.

On a narrow screen, they all line up vertically fine and there is no problem.

The problem arises on wider screens where they alternate sides of the timeline. The elements are different heights based on how much text they contain. This causes them to not line up with their corresponding icons opposite of the text.

Can anyone figure out how to tweak this without using JS? https://jsfiddle.net/nam8xbt1/

1 Upvotes

2 comments sorted by

0

u/[deleted] 27d ago

[removed] — view removed comment

1

u/negsplit_pgh 23d ago

With the three-column grid suggested here, explicitly put the icon and card in the same row (`grid-row: 1` on both within each `.timeline-item`). Setting their columns alone leaves row placement automatic, which can put them on different rows when the right-hand card comes first in the markup.