

- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
CSS align-self property
Set the alignment of any flex-item with the align-self property. You can try to run the following code to implement the CSS align-self property
Example
<!DOCTYPE html> <html> <head> <style> .mycontainer { display: flex; height: 300px; background-color: orange; } .mycontainer > div { background-color: white; text-align: center; line-height: 90px; font-size: 40px; width: 100px; margin: 50px; } </style> </head> <body> <h1>Quiz</h1> <div class = "mycontainer"> <div>Q1</div> <div>Q2</div> <div>Q3</div> <div style = "align-self: center">Q4</div> <div>Q5</div> </div> </body> </html>
- Related Questions & Answers
- CSS align-items property
- CSS align-content property
- CSS text-align-last property
- Usage of text-align property in CSS
- Align elements using the CSS float property
- Animate vertical-align property with CSS Animation
- Usage of CSS align-content property center value
- Usage of CSS align-items property stretch value
- Usage of CSS align-items property center value
- Usage of CSS align-items property baseline value
- Usage of CSS align-content property stretch value
- HTML Window self Property
- Usage of CSS align-content property space-around value
- Usage of CSS align-items property flex-end value
- Usage of CSS align-content property flex-end value
Advertisements