jQuery tabs: panel covers tabs at 100% height

后端 未结 10 883
生来不讨喜
生来不讨喜 2021-01-11 13:15

I\'m trying to use the tabs widgets of jQuery-UI having panels content to extend to the whole available space.

Here\'s a simplified version of what I\'ve got so far:

10条回答
  •  花落未央
    2021-01-11 13:54

    OP,

    Check this Fiddle.

    The parent #tabs has overflow: hidden;. In addition to the children: #tabs div[id*=tab] having overflow:auto set. This ensures that the parent will set the bounds, and in the event that there is overflowing content in the tab, the scrollbar appearance will be delegated by the tab itself.

    Also, just for those unfamiliar with the syntax #tabs div[id*=tab], this wildcard will match any child div of #tabs whose id contains "tab". This can be accomplished a number of ways, but I chose this route for quick-prototyping.

    Hope this helps.

提交回复
热议问题