scrollbar not starting from first element flex

Solutions on MaxInterview for scrollbar not starting from first element flex by the best coders in the world

showing results for - "scrollbar not starting from first element flex"
Maria José
01 Feb 2017
1/*To fix this problem use flexbox auto margins, instead of justify-content.
2
3With auto margins, an overflowing flex item can be vertically and horizontally centered without losing access to any part of it.
4
5So instead of this code on the flex container:
6*/
7
8#flex-container {
9    align-items: center;
10    justify-content: center;
11}
12/*Use this code on the flex item:*/
13
14.flex-item {
15    margin: auto;
16}