You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Start Bootstrap SB Admin侧边导航栏无法滚动问题解决方法

Fix for Non-Scrollable Sidebar in SB Admin Template

Hey folks! I recently ran into the exact issue where the sidebar navigation in the SB Admin template wouldn’t scroll when there were too many menu items. I fixed it by adding this custom CSS snippet to my stylesheet—worked like a charm for me, though there might be more optimized solutions out there. Sharing it just in case it helps you too:

.navbar-sidenav {
  overflow-y: auto !important;
  -ms-overflow-style: none !important;
}

.navbar-sidenav::-webkit-scrollbar {
  width: 0px !important;
  display: none !important;
}

Here’s a quick run-through of what each part does:

  • overflow-y: auto !important turns on vertical scrolling only when the sidebar content exceeds its height
  • -ms-overflow-style: none !important hides the default scrollbar in IE and Edge
  • The ::-webkit-scrollbar rule removes the scrollbar in Chrome, Safari, and other WebKit-based browsers for a cleaner visual

Feel free to adjust this to fit your specific setup!

内容的提问来源于stack exchange,提问作者Greg Lowe

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.21 06:55:29