फ्लेक्सबॉक्स दाएं और बाएं संरेखित करें
.primary-nav {
display:-webkit-flex;
display:flex;
list-style-type:none;
padding:0;
justify-content:flex-end;
}
.left {
margin-right:auto;
}
सीएसएस फ्लेक्स केंद्र क्षैतिज और खड़ी
display: flex;
align-items: center;
justify-content: center;
केंद्रित के साथ flexbox
/* HORIZONTAL */
justify-content: center;
/* VERTICAL */
align-items: center;
फ्लेक्स का उपयोग करके सीएसएस में कैसे केंद्र सामग्री
display: flex;
width: 60%;
justify-content: center;
margin: 0 auto;
flexbox मध्य आइटम केंद्रित
.Aligner {
display: flex;
align-items: center;
justify-content: center;
}
.Aligner-item {
max-width: 50%;
}
.Aligner-item--top {
align-self: flex-start;
}
.Aligner-item--bottom {
align-self: flex-end;
}
फ्लेक्स बच्चों को साइड में संरेखित करें
flex-direction: column;
align-items: flex-start; //left
align-items: center; //center
align-items: flex-end; //right