HTML5/CSS align list items based on mutual height of other columns

王林
Release: 2023-08-19 15:29:12
forward
841 people have browsed it

HTML5/CSS align list items based on mutual height of other columns

Align list items by using flex. Flex makes columns flexible based on their content. The wrapper will lay out the columns in a row.

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

Flex is basically an attribute that helps make an element flexible.

Use the following code to vertically align the list to the bottom −

.col .content {
   margin-top: auto;
}
Copy after login

The above is the detailed content of HTML5/CSS align list items based on mutual height of other columns. For more information, please follow other related articles on the PHP Chinese website!

source:tutorialspoint.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!