You can simply use the CSS margin-left property with the value auto to right align flex item within a flex container. Please note that all child elements of flex container automatically become flex items.
The last item in the following example having the class .ml-auto will be automatically aligned to the right side. Let's try it out to understand how it basically works:
Use the CSS
margin-leftPropertyYou can simply use the CSS
margin-leftproperty with the valueautoto right align flex item within a flex container. Please note that all child elements of flex container automatically become flex items.The last item in the following example having the class
need an explanation for this answer? contact us directly to get an explanation for this answer.ml-autowill be automatically aligned to the right side. Let's try it out to understand how it basically works: