I've made an workaround by creating an scrollbar for a different element that overlays (scrollbar-part of) the grid using a fixed position. The idea came from here. Here is my applied version:
JSFiddle
Code:
JS:
function Scroll(element) {
var scrollbar = document.getElementById('scrollWrapper');
var child = scrollbar.appendChild(document.createElement('div')); //create content
child.style.width= '1000px';
child.appendChild(document.createTextNode('\xA0'));
scrollbar.onscroll= function() {
element.scrollLeft= scrollbar.scrollLeft;
};
element.onscroll= function() {
scrollbar.scrollLeft= element.scrollLeft;
};
}
Scroll(document.getElementById('container'));
HTML:
<div id="container">
<div class="grid">
<div class="grid-background">
</div>
</div>
</div>
<div id="scrollWrapper">
</div>
CSS:
#container {
overflow-y: scroll !important;
overflow:hidden;
height: 520px;
width: 721px;
}
#scrollWrapper{
position:fixed;
margin-top: -39px;
width: 700px;
overflow: hidden;
overflow-x:auto !important;
}
.grid {
width: 700px;
overflow-x:hidden
position: relative;
border-radius: 5%;
}
.grid-background {
width: 1000px;
height: 1000px;
//background: linear-gradient(left, red, yellow);
/* TEST GRADIENT (HORIZONTAL) */
background: #d0e4f7;
background: -moz-linear-gradient(left, #d0e4f7 0%, #73b1e7 24%, #0a77d5 50%, #539fe1 79%, #87bcea 100%);
background: -webkit-linear-gradient(left, #d0e4f7 0%,#73b1e7 24%,#0a77d5 50%,#539fe1 79%,#87bcea 100%);
background: linear-gradient(to right, #d0e4f7 0%,#73b1e7 24%,#0a77d5 50%,#539fe1 79%,#87bcea 100%);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#d0e4f7', endColorstr='#87bcea',GradientType=1 );
}
Hope I helped! :)