Quantcast
Channel: Active questions tagged flexbox - Stack Overflow
Viewing all articles
Browse latest Browse all 1470

How can i make my elements inline side by side [duplicate]

$
0
0

I'm struggling a bit to figure this out. I have 3 elements in a flexbox section with the flex direction on the section set to column.

So far my code centersmy h2 element at the top of the section and the 3 elements in a centered column below each other as the flex-direction tells it to be. See attached screenshot.

.projects {  display: flex;  align-items: center;  text-align: center;  flex-direction: column;}/* projects placeholder */.projects div {  background-color: var(--secondary-color);  border-radius: 20px;  width: 360px;  height: 480px;  margin: 15px;  color: var(--primary-color);}
<section class="projects" id="projects"><h2>Projects</h2><div class="proj1"><p>Placeholder</p></div><div class="proj2"><p>Placeholder</p></div><div class="proj3"><p>Placeholder</p></div></section>

What would i need to do to put my 3 elements side by side by side under the h2?


Viewing all articles
Browse latest Browse all 1470

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>