Answers for "how to align one flex item to different direction from flex div"

CSS
0

align items left after flex-direction row reverse

#main {
  width: 400px;
  height: 400px;
  border: 1px solid #c3c3c3;
  display: flex;
  flex-direction: row-reverse;
  align-items: flex-start;
  justify-content: flex-end; <------need this
}

#main div {
  width: 50px;
  height: 50px;
}
Posted by: Guest on July-20-2021
1

flexbox align or justify one single item

margin-right: auto; /* align left ⇦ */
margin-left: auto; /* align right ⇨ */

margin-bottom: auto; /* align top ⇧ */
margin-top: auto; /* align bottom ⇩ */
Posted by: Guest on July-07-2021

Browse Popular Code Answers by Language