In the footer of a responsive website, I need to evenly distribute some li items.
This is what I want to achieve:
And this is what I have:
I would like to avoid setting absolute width for each li, to keep a responsive capability of this part of the website.
What would be the optimal way to proceed?
You could try
text-align:justify;
for your ul element
here is a fiddle
The effect in your screenshot can be achieved by using a margin:
.bottomMenu li {
margin-right: 24px;
}
If you want a nice, justified look and you are not concerned with very old browsers, you can use a flex model:
.bottomMenu (
display: flex;
justify-content: space-between;
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.