To put it simple, this is what i want (obtained on a Webkit Browser using -webkit-scrollbar) :
And this is what I get on Opera (Firefox doesn't apply the border radius to the scrollbar either, but still applies the border) :
Is there a simple way to make the border not disappear under the scrollbar ?
I dont need the fancy style of -webkit-scrollbar but i would like the page to look clean and symmetric...
Put the content that needs to be scrolled in a
div
withoverflow: auto
. Around that contentdiv
put adiv
with your rounded corners andoverflow: hidden
.Now you can see the scroll bar but its outer corners are hidden and are not disturbing the rounded corners of the outer
div
.Example:
I've been having the same issue. It's not the most elegant of solutions but this is what I did...
Simply put a smaller div inside your outer box so the scroll bar doesn't overlap the outer box. Like this http://codepen.io/DeadWhisky/pen/eKFha
Would be nice if you could supply a fiddle. Nevertheless, you shoud try changing the box-sizing on the container to border-box (if not already done):