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

View all comments

Show parent comment

1

u/[deleted] Nov 10 '23

I saw your comment and hence I drew a sketch as per my understanding. I am not sure if you had opened the link. I am just trying to be helpful here.

1

u/[deleted] Nov 10 '23

yeah i realised afterwards , sorry

1

u/[deleted] Nov 10 '23

Hey, no problem.