Hacker News new | ask | show | jobs
by robin_reala 663 days ago
Assuming your div has a class of outer it’s:

.outer { display: flex; justify-content: space-between; align-items: center; }

…and that’s it. (This is assuming your items are of equal width of course. It gets a little bit more complicated if not.)

1 comments

I've literally told you the items can be of arbitrary width and height. `space-between` won't keep the middle item centered.