Semantic ui List: Enable scrolling bar

pedjjj picture pedjjj · Jul 16, 2015 · Viewed 13.6k times · Source

I have a semantic ui list which contains so many items that it is longer than the window. I want to have a scrolling bar only for the list itself, however, the browser displays a scrolling bar for the complete website.

Should I put the list in a container div and set its height=100% or what is the best way to achieve this?

Thanks a lot :-)

Answer

ALPHARD. picture ALPHARD. · Jun 8, 2016

Add the following css to you ui list div:

height: 100%;
overflow: scroll;

To make this work, you have to make sure the div containing you list div has some fixed height. In the comment you mentioned that setting 100% doesn't work, this can happen if one of "ancestor" divs does not have fixed height.