Flexbox Child Alignment issue

Screenshot 2023-11-05 at 20.50.55
Screenshot 2023-11-05 at 20.51.17

I’m trying to align a Flexbox child to the very right, but it only gives me the option to align it to the top or the bottom. While sometimes it shows the exact opposite. Why is that and how can I swap it?

Check the Direction of the flex parent — this controls the axis that you can align the flex children:

image

Thanks, but I don’t want to have my list on a vertical axis. It would completely mess up my design. I have 4 text items sitting left aligned on a horizontal axis within a container and I want to push the last item over to the right.

The way I solved it now was to drop in another div and parent it to the last item, flex it again and set the alignment to the right. Would that be the best solution?

Flexbox child alignment issue in CSS. Check container direction and justify-content for right alignment. CSS Flexbox.

It’s going to be hard to give any direction without seeing screenshots of what you’re trying to achieve as well as seeing how the project was set up in the Designer. Based on your reply it sounds like you’re on the right path by utilizing another div but I can’t say whether or not it’s necessary and/or the best solution.

If you can share those screenshots and/or a read-only link I’d be happy to take a closer look :+1: