How to enable overflow scrolling within a Semantic Ui Grid?

孤街浪徒 提交于 2019-12-03 13:57:52

Grids elements of Semantic UI got display: inline-block, so you can set white-space:nowrap to prevent that elements wrap in a row:

<div class="features ui grid noMargin" style="overflow-y:auto;white-space:nowrap;">
    <div class="four wide column greyOdd">Stuff here</div>
    <div class="four wide column greyEven">More stuff</div>
    <div class="four wide column greyOdd">Calls n stuff</div>
    <div class="four wide column greyEven">Testing look</div>
    <div class="four wide column greyOdd">Stuff here</div>
    <div class="four wide column greyEven">More stuff</div>
    <div class="four wide column greyOdd">Calls n stuff</div>
    <div class="four wide column greyEven">Testing look</div>
</div>

Since 3rd July 2017 there is a "scrolling content" style available. See closing note in https://github.com/Semantic-Org/Semantic-UI/issues/4335

This makes the entire grid content scroll on overflow. For me this scrolled vertically as I have too much content in single-row columns.

<div class="ui grid scrolling content">

Modal example:

<div class="ui modal">
  <div class="header">Header</div>
  <div class="scrolling content">
    <p>Very long content goes here</p>
  </div>
</div>
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!