Link: https://jsfiddle.net/casas111/d32m7603/2/
I need the overflow to be visible but at the same time to be able to scroll it from inside the div.
jsfiddle code:
html:
<div class="screen">
<p class="content">Pellentesque habitant morbi
tristique senectus et netus
et malesuada fames ac turpis
egestas. Vestibulum tortor quam,
feugiat vitae, ultricies eget,
tempor sit amet, ante. Donec eu
libero sit amet quam egestas semper.
Aenean ultricies mi vitae est. Mauris
placerat eleifend leo. Aenean ultricies
mi vitae est. Mauris placerat eleifend leo
Pellentesque habitant morbi
tristique senectus et netus
et malesuada fames ac turpis
egestas. Vestibulum tortor quam,
feugiat vitae, ultricies eget,
tempor sit amet, ante. Donec eu
libero sit amet quam egestas semper.
Aenean ultricies mi vitae est. Mauris
placerat eleifend leo. Aenean ultricies
mi vitae est. Mauris placerat eleifend leo
Pellentesque habitant morbi
tristique senectus et netus
et malesuada fames ac turpis
egestas. Vestibulum tortor quam,
feugiat vitae, ultricies eget,
tempor sit amet, ante. Donec eu
libero sit amet quam egestas semper.
Aenean ultricies mi vitae est. Mauris
placerat eleifend leo. Aenean ultricies
mi vitae est. Mauris placerat eleifend leo
</p>
</div>
CSS
.screen {
border-style: solid;
width: 200px;
height: 300px;
margin-left: 30%;
margin-top: 20%;
overflow: auto;
}
I have seen this: How to combine overflow:visible and overflow:scroll in CSS?
But there is no clear answer. text-indent is for the horizontal case. This is a simple vertical case.
EDIT:
This code solves hidding the scroll. I'm still not able to show the overflow of content ouside the screen. Anyone?
.screen {
margin-left: 30%;
margin-top: 20%;
width: 190px;
overflow: hidden;
height: 100%;
border: 2px solid #000;
}
.content {
width: 200px;
height: 300px;
padding: 5px 10px 5px 5px;
overflow: auto;
}
.screen::-webkit-scrollbar {
display: none;
}