alignment [flexbox]
Hi,
To realize the prototype, I started from moving ".col1" to the top of "main".
I wrote,
main {
position: relative;
}
.col 1 {
top: 0;
}
But it doesn't work.
How would I do?
Hosun Kang

Hi,
To realize the prototype, I started from moving ".col1" to the top of "main".
I wrote,
main {
position: relative;
}
.col 1 {
top: 0;
}
But it doesn't work.
How would I do?
Hosun Kang

That's because you are aligning the columns to be vertically centered in the 'main' div - align-items: center;
main {
display: flex;
align-items: center;
padding: 0px 40px;
position: relative;
}
It looks as though your prototype column widths are all different, so use flex-basis as the width rather than flex: 1;
Col 1:
flex-basis: 30%;
Col 2:
flex-basis 20%;
Col 3:
flex-basis: 50%
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.