r/csshelp • • Nov 10 '23

centering elements in different flexboxes

imagine you have two flexboxes. One of them contains one element while the other contains two elements. is there a way to center, for example, the first element of the second flexbox with the one element in the first flexbox. In other words, how can i align two unrelated elements without just doing trial and error until i get something that looks right, i want something that is exactly right. Can i still use flexboxes here or is grid better?

3 Upvotes

15 comments sorted by