Reputation: 643
I've got a really small scroll-able table which shows scroll buttons and scroll-bar just fine in older IEs, but IE11 has problems, because up/down buttons are so large that they somehow overlap and user cannot even press the "down" button let alone grab the scroll indicator - its not even visible. The only option to scroll is via mouse scroll-er or keyboard buttons.
Here is how the problem looks like (IE 8, IE 9, IE 11):
Is there anyway I can affect scroll-bar button sizes in IE via css/html/JavaScript? Can users change something on their end (besides not using IE11)? Will I have to redesign this part of the page to be bigger?
Upvotes: 7
Views: 1662
Reputation: 169
You can edit your scrollbar and improve your UI design for better useable. This method also works in the table for design scrollbar and supports all browsers.
.scrollable {
background-color: #a3d5d3;
height: 100%;
overflow-y: auto;
}
.scrollable-container {
background-color: #a3d5d3;
width: 240px;
height: 160px;
position: relative;
overflow: hidden;
margin: auto;
margin-top: 16px;
}
.scrollable div {
font-size: 23px;
}
/*IE*/
@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
.scrollable {
margin-right: -10px;
padding-top: 32px;
margin-top: -32px;
margin-bottom: -32px;
padding-bottom: 32px;
/* ie scrollbar color properties */
scrollbar-base-color: #efefef;
scrollbar-face-color: #666666;
scrollbar-3dlight-color: #666666;
scrollbar-highlight-color: #666666;
scrollbar-track-color: #efefef;
scrollbar-arrow-color: #666666;
scrollbar-shadow-color: #666666;
scrollbar-dark-shadow-color: #666666;
}
.scrollable:after {
content: "";
height: 32px;
display: block;
}
}
/*Edge*/
@supports (-ms-ime-align:auto) {
.scrollable {
margin-right: -10px;
padding-top: 16px;
margin-top: -16px;
margin-bottom: -16px;
padding-bottom: 16px;
}
.scrollable:after {
content: "";
height: 16px;
display: block;
}
}
/*Firefox*/
/*From version 64 - https://drafts.csswg.org/css-scrollbars-1/*/
.scrollable {
scrollbar-width: thin;
scrollbar-color: #666666 #efefef;
}
/*Chrome*/
.scrollable::-webkit-scrollbar-track {
background-color: #efefef;
width: 4px;
}
.scrollable::-webkit-scrollbar-thumb {
background-color: #666666;
border: 1px solid transparent;
background-clip: content-box;
}
.scrollable::-webkit-scrollbar {
width: 8px;
}
<div class="scrollable-container">
<div class="scrollable">
<div>Element 1</div>
<div>Element 2</div>
<div>Element 3</div>
<div>Element 4</div>
<div>Element 5</div>
<div>Element 6</div>
<div>Element 7</div>
<div>Element 8</div>
<div>Element 9</div>
</div>
</div>
Upvotes: 1
Reputation: 749
You probably want to use: nanoscroller, though for best usability I would advise you to make the page height bigger
Upvotes: 1