Skip to content
Advertisement

Aligning an item to the end of a responsive card, with vertical centering

I am attempting to align an item, in this case a Font Awesome icon, to the end of a responsively sized card (width wise). I am struggling to get this to work. Here is my html for my card:

JavaScript

As you can see the chevron does not remain at the end of the card. Any help appreciated, thanks.

Here is what I want it to look like: enter image description here

Advertisement

Answer

Best way I think to do this is like this:

a bit change on HTML structure, just pulled the icon outside the car-body div

JavaScript

CSS

JavaScript
Advertisement