How to pull the child to the right with CSS3 Flex?

Spread the love

Sometimes, we want to pull the child to the right with CSS3 Flex.

In this article, we’ll look at how to pull the child to the right with CSS3 Flex.

How to pull the child to the right with CSS3 Flex?

To pull the child to the right with CSS3 Flex, we set the margin-left property.

For instance, we write

ul li:last-child {
  margin-left: auto;
}

to add margin-left: auto; to move the last li to the right.

Conclusion

To pull the child to the right with CSS3 Flex, we set the margin-left property.

Leave a Reply

Your email address will not be published. Required fields are marked *