Align List Items Depending on Other Columns in HTML5 CSS



Align list-item with the help of flex. Flex will make columns flexible according to content. The wrapper will layout columns in a row.

.wrap{
   display : flex
}// This will help wrapper to become flexible
.wrap.col{
   flex: 1 0 33%;
}

Flex is basically a property which helps in making element flexible.

Use the following to keep the lists vertically aligned to the bottom −

.col .content {
   margin-top: auto;
}
Updated on: 2020-06-24T13:54:45+05:30

191 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements