.content-top {
/*position :absolute;*/
top: 0;
height: 50px;
width : 200px;
background-color: red;
}
Commenting out 'position: absolute' on the .content-top element fixes the problem.
Question
When you have a scrollable div with a border-radius the children divs eclipse or do not respect this border radius. For instance here is a fiddle showing the problem :
http://jsfiddle.net/Thatguyhampton/E9dmr/2/
.scrollable {
overflow: auto;
overflow-y: overlay;
-webkit-overflow-scrolling: touch;
-webkit-transform: translate3d(0, 0, 0);
height: 400px;
width: 200px;
background-color: blue;
border-radius : .5em;
}
.content {
height: 500px;
width: 200px;
}
.content-top {
position :absolute;
top: 0;
height: 50px;
width : 200px;
background-color: red;
}
The red area is showing sharp corners instead of the rounded ones of the parent. Is there any way around this?
Solution 2
.content-top {
/*position :absolute;*/
top: 0;
height: 50px;
width : 200px;
background-color: red;
}
Commenting out 'position: absolute' on the .content-top element fixes the problem.
OTHER TIPS
.scrollable {
overflow: auto;
overflow-y: overlay;
-webkit-overflow-scrolling: touch;
-webkit-transform: translate3d(0, 0, 0);
height: 400px;
width: 200px;
background-color: blue;
border-radius : .5em;
}
.content {
height: 400px;
width: 200px;
}
.content-top {
/*position :absolute;*/
top: 0;
height: 50px;
width : 200px;
background-color: red;
}
The red element doesn't have border-radius and go hover the scrollable radius element(the blue one). the border radius doesn't make cropping! (only border radius)
for fixing the issue: you can add the red element the border-radius to the top left corner.
.content-top {
border-top-left-radius : .5em;
}