

- 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
Show the flex lines with spaces all around with CSS
<p>Use the<em> align-content</em> property with value <em>space-around </em>to add space around the flex lines.</p><p>You can try to run the following code to implement the <em>space-around</em> value</p><h2>Example</h2><p><a class="demo" href="http://tpcg.io/4JPfpI" rel="nofollow noopener noreferrer" target="_blank">Live Demo</a></p><pre class="prettyprint notranslate"><!DOCTYPE html> <html> <head> <style> .mycontainer { display: flex; height: 200px; background-color: #884EA0; align-content: space-around; flex-wrap: wrap; } .mycontainer > div { background-color: #00FF00; text-align: center; line-height: 60px; font-size: 30px; width: 100px; margin: 5px; } </style> </head> <body> <h1>Queue</h1> <div class = "mycontainer"> <div>Q1</div> <div>Q2</div> <div>Q3</div> <div>Q4</div> <div>Q5</div> <div>Q6</div> <div>Q7</div> <div>Q8</div> </div> </body> </html></pre>
- Related Questions & Answers
- Align flex lines with CSS
- Show the flex lines with equal space between them
- Display the flex items with space between the lines in CSS
- Display the flex lines in the center of the container with CSS
- Display the flex lines in the end of the container with CSS
- Display the flex lines at the start of the container with CSS
- Wrap the flex items with CSS
- Create a glow around the object with CSS
- Set the flex items vertically with CSS
- Set the flex items horizontally with CSS
- Set a border around navbar with CSS
- Set the text shadow around a text with CSS
- Avoid wrapping flex items with CSS
- Show the background image only once with CSS
- Wrap the flex items in reverse order with CSS
Advertisements