pedjjj
pedjjj

Reputation: 1038

Semantic ui List: Enable scrolling bar

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 :-)

Upvotes: 7

Views: 16337

Answers (1)

ALPHARD.
ALPHARD.

Reputation: 136

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.

Upvotes: 12

Related Questions