I have been searching for a solution to my problem, but I am struggling to articulate my question in a concise manner. So far, I have come up empty-handed.
Here is the scenario:
When viewed on a large screen, I want the layout to look like this:
edge| [CONTENT A] ... space ... [CONTENT B] |edge
I have been able to achieve this using justify-content: space-between
.
However, when the window size is reduced, the layout changes to:
edge| [CONTENT A] ... space ... |edge
edge| [CONTENT B] ... space ... |edge
(I am using flex-wrap: wrap
)
What I would like is:
edge| ... space ... [CONTENT A] |edge
edge| ... space ... [CONTENT B] |edge
- I have experimented with
width: 100%; text-align: right
, but on larger screens, the content appears centered becausecontent A
is pushed to the right. - I tried using
margin-left: auto
, which provides a similar visual effect: it works on smaller screens, butcontent A
still looks centered on wider screens. - Using
did not produce the desired effect.align-items: flex-end; align-content: flex-end
- Even
align-self: flex-end
did not yield results.
Any suggestions would be greatly appreciated. Thank you.