Answers for "scrollbar not starting from first element flex"

CSS
1

scrollbar not starting from first element flex

/*To fix this problem use flexbox auto margins, instead of justify-content.

With auto margins, an overflowing flex item can be vertically and horizontally centered without losing access to any part of it.

So instead of this code on the flex container:
*/

#flex-container {
    align-items: center;
    justify-content: center;
}
/*Use this code on the flex item:*/

.flex-item {
    margin: auto;
}
Posted by: Guest on February-12-2021

Code answers related to "scrollbar not starting from first element flex"

Browse Popular Code Answers by Language