I need help with styling a div that will contain a large amount of text on my webpage. I want to use the overflow-y property for scroll, but the issue arises when trying to style the scroll bar with a radius. Check out this jsfiddle link for reference:
https://jsfiddle.net/cjbruin/kkve1bas/
Here is the code snippet:
HTML
<div>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse eget
turpis nisi. Sed pellentesque urna a fringilla feugiat. Vivamus consequat
vitae risus nec congue. Nulla faucibus hendrerit velit vitae euismod.
Pellentesque efficitur efficitur aliquet. Vivamus ut nunc mi. Fusce
aliquam quam sit amet malesuada lacinia.
Aenean vulputate sagittis porta. Nullam vehicula tellus a erat malesuada gravida.
Vestibulum vulputate eros consectetur ipsum luctus fermentum. Cras consequat
sollicitudin elit, sed tempor nulla gravida ac. Donec in porttitor ipsum. Sed
a nisi nec massa euismod tincidunt sed vitae justo. Phasellus a nunc commodo,
imperdiet nulla vitae, sollicitudin mi. Pellentesque aliquet faucibus sapien et
congue. In vel diam vitae orci interdum sollicitudin. In a tristique libero,
vitae finibus metus. Aliquam portt...</div>
CSS
div {
height: 300px;
width: 400px;
border: 2px solid black;
overflow-y: scroll;
border-radius: 7%;
}
Is there a way to solve this using CSS3 only? Or would I have to resort to JS/jQuery for a solution?