Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialgene c
13,630 PointsWhy are the columns side-by-side even though I wrote flex-direction: column?
The columns are placed side-by-side when flex-direction: column
and the columns are placed one on top of the other when flex-direction: row
shouldn't it be the opposite?
My CSS code:
@media (min-width: 769px) {
.main-header,
.main-nav,
.row,
.col {
display: flex;
}
.main-header {
flex-direction: column;
align-items: center;
}
.col {
flex: 1;
flex-direction: column;
}
.button {
margin-top: auto;
align-self: flex-start;
}
}
1 Answer
vincent batteast
51,094 Pointshere a site that I like to use https://www.w3schools.com/css/css3_flexbox.asp#flex-direction
but this is what I think you need to change
.col {
display: flex;
}
change that to
.col {
display: flex;
flex-direction: column;
}