
- 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 flex-direction Property
To define the direction of the flex-items, use the flex-direction property. Let us set the direction vertically
Example
<!DOCTYPE html> <html> <head> <style> .mycontainer { display: flex; flex-direction: column; background-color: orange; } .mycontainer > div { background-color: white; text-align: center; line-height: 40px; font-size: 25px; width: 100px; margin: 5px; } </style> </head> <body> <h1>Quiz</h1> <div class = "mycontainer"> <div>Q1</div> <div>Q2</div> <div>Q3</div> <div>Q4</div> <div>Q5</div> <div>Q6</div> </div> </body> </html>
- Related Questions & Answers
- Shorthand CSS property for flex-direction and flex-wrap
- Role of CSS flex-direction property column value
- Role of CSS flex-direction property row value
- Role of CSS flex-direction property column-reverse value
- Role of CSS flex-direction property row-reverse value
- CSS animation-direction property
- CSS flex property
- CSS flex-shrink property
- CSS flex-wrap Property
- CSS flex-grow property
- CSS flex-flow Property
- CSS flex-basis property
- Animate CSS flex property
- Usage of direction property in CSS
- Animate CSS flex-basis property
Advertisements