p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   CSS Cascading Style Sheets (http://p2p.wrox.com/forumdisplay.php?f=146)
-   -   justifiy the list (http://p2p.wrox.com/showthread.php?t=100233)

zyrox June 4th, 2019 12:09 PM

justifiy the list
 
Hello, I am newbie and I want know how to justify the list (ul/ol) in a simple code? Thank you

ghanendra-yadav July 2nd, 2019 06:17 PM

Just change in CSS parent class display: flex and then justify-content: space-between or justify-content: space-around.

Example:

HTML

Code:

<ul class="Menus-Class">
    <li>About</li>
    <li>Contact</li>
    <li>Contact Longer Link</li>
    <li>Contact</li>
</ul>

CSS

Code:

ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.Menus-Class {
    display: flex;
    justify-content: space-between;
}



All times are GMT -4. The time now is 11:02 AM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.