CSS justify-content: flex-end का उपयोग करके फ्लेक्स आइटम्स को मुख्य अक्ष (क्षैतिज) के अंत (दाएं) पर संरेखित करें।
उदाहरण
<!DOCTYPE html> <html> <head> <style> .mycontainer { display: flex; background-color: red; justify-content: flex-end; } .mycontainer > div { background-color: #E6B0AA; text-align: center; line-height: 60px; font-size: 30px; width: 100px; margin: 5px; } </style> </head> <body> <h1>Score</h1> <div class = "mycontainer"> <div>20</div> <div>35</div> <div>88</div> <div>62</div> </div> </body> </html>
व्याख्या: चार आइटम्स (20, 35, 88, 62) कंटेनर के दाएं किनारे पर जमा होते हैं, बाएं तरफ खाली स्थान रहता है।