- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Align flex items at the end of the container with CSS
Use the justify-content property with value flex-end to align the flex-items at the end.
Example
You can try to run the following code to implement the flex-end value −
<!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>
- Related Articles
- Align flex items at the center of the container with CSS
- Align flex items at the beginning of the container with CSS
- Align the flex items in the bottom of the container in CSS
- Align the flex items in the middle of the container in CSS
- Align the flex items in the top of the container in CSS
- Usage of CSS align-items property flex-end value
- Display the flex lines in the end of the container with CSS
- Display the flex lines at the start of the container with CSS
- Usage of CSS align-items property flex-start value
- Usage of CSS align-content property flex-end value
- How to specify the direction of the flexible items inside a flex container with CSS?
- Align flex items in the end on different screen sizes in Bootstrap
- Align a flex item at the end in Bootstrap 4
- Align gathered items at the end in Bootstrap 4
- Wrap the flex items with CSS

Advertisements