admin管理员组文章数量:1418113
I have a table with 2 columns and multiple rows
<table border=0 id="feed">
<tr><td>something</td><td><div class="bubble"></div></td></tr>
<tr><td style="">something1</td><td><div class="bubble"></div></td></tr>
<tr><td style="">something2</td><td><div class="bubble"></div></td></tr>
<tr><td style="">something3</td><td><div class="bubble"></div></td></tr>
<tr><td style="">something4</td><td><div class="bubble"></div></td></tr>
<tr><td style="">something5</td><td><div class="bubble"></div></td></tr>
<tr><td>something-else1</td><td><div class="bubble"></div></td></tr>
<tr><td>something-els2</td><td><div class="bubble"></div></td></tr>
</table>
I want to be able to scroll down without showing the scrollbar (implying that the total height of the rows exceed the 800px limit) . I am looking for a Chrome/Firefox patible fix.
Current properties of feed:
#feed{
display: block;height: 800px;overflow-y: scroll;
}
This only works on the chrome framework:
#feed::-webkit-scrollbar {
display: none;
}
EDIT:
I tried adding a parent to the table (according to Hide scroll bar, but still being able to scroll):
#outer{
overflow-y:hidden;
height:800px;
}
#feed{overflow:scroll;}
HTML:
<div id="outer"><table border=0 id="feed">...</table></div>
Please note that the total height is bigger than 800px so scrolling should work. It does not, though.
I have a table with 2 columns and multiple rows
<table border=0 id="feed">
<tr><td>something</td><td><div class="bubble"></div></td></tr>
<tr><td style="">something1</td><td><div class="bubble"></div></td></tr>
<tr><td style="">something2</td><td><div class="bubble"></div></td></tr>
<tr><td style="">something3</td><td><div class="bubble"></div></td></tr>
<tr><td style="">something4</td><td><div class="bubble"></div></td></tr>
<tr><td style="">something5</td><td><div class="bubble"></div></td></tr>
<tr><td>something-else1</td><td><div class="bubble"></div></td></tr>
<tr><td>something-els2</td><td><div class="bubble"></div></td></tr>
</table>
I want to be able to scroll down without showing the scrollbar (implying that the total height of the rows exceed the 800px limit) . I am looking for a Chrome/Firefox patible fix.
Current properties of feed:
#feed{
display: block;height: 800px;overflow-y: scroll;
}
This only works on the chrome framework:
#feed::-webkit-scrollbar {
display: none;
}
EDIT:
I tried adding a parent to the table (according to Hide scroll bar, but still being able to scroll):
#outer{
overflow-y:hidden;
height:800px;
}
#feed{overflow:scroll;}
HTML:
<div id="outer"><table border=0 id="feed">...</table></div>
Please note that the total height is bigger than 800px so scrolling should work. It does not, though.
Share Improve this question edited May 23, 2017 at 12:03 CommunityBot 11 silver badge asked Mar 5, 2014 at 10:00 GabeGabe 9711 gold badge10 silver badges23 bronze badges 3-
1
How are you expecting people to scroll (or even know that there is hidden content that can be scrolled to) without showing a scroll bar?
overflow: hidden
would seem to fit what you want, but it would be terrible UX. – Rory McCrossan Commented Mar 5, 2014 at 10:01 - Check this link – Mr_Green Commented Mar 5, 2014 at 10:02
- @RoryMcCrossan No, that disables the scroll capability. In the context I work in, the existence of the "hidden content" can be deducted upon scrolling a list of msgs. – Gabe Commented Mar 5, 2014 at 10:07
2 Answers
Reset to default 3You can do it like this:
#feed{
display: block;
height: 100px;
overflow-y: scroll;
margin-right: -30px;
}
#outer{
overflow:hidden;
}
#feed{
display: block;
height: 800px;
overflow-y: hidden;
}
本文标签: javascriptHide scrollbar (with scroll enabled)Stack Overflow
版权声明:本文标题:javascript - Hide scrollbar (with scroll enabled) - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745277627a2651273.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论