Skip to content
Advertisement

Why does my content disappear when using scroll

I have a list of servers in a scroll container name servers and the top of the list is hidden under the navbar:

HTML:

JavaScript

CSS:

JavaScript

This list starts empty. divs are added to this list of servers when you use the site. When too many divs are added, scrolling starts. But the problem is that the top objects are hidden under the scroll and you can no longer see them when the scroll bar is at the top.

Here is CSS of the divs to be added:

JavaScript

In the example below, I have manually inserted objects:

JavaScript
JavaScript

Advertisement

Answer

A similar problem can be solved by using pseudo-elements on the container (for center alignment in the direction instead of justify-content: center) with the flex: 1 1 0 property. Example below:

JavaScript
JavaScript
User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement