I have scrollable div with child div. Is there any way to show whole child (also outside of scrollable div)? Now, overflow-x: scroll
is like overflow-x: hidden
with scrollbar. I would like overflow-x: visible
with scrollbar. Here is fiddle.
.container {
margin: 0 auto;
overflow-x: scroll;
width: 300px;
}
.child {
background-image: linear-gradient(to left, blue, green);
height: 100px;
width: 600px;
}
.containerExample {
background-image: linear-gradient(to left, blue, green);
margin: 0 auto;
overflow-x: visible;
width: 600px;
}
.childExample {
border: 1px solid red;
height: 100px;
margin: 0 auto;
width: 300px;
}
Now:
<div class="container">
<div class="child">
</div>
</div>
What I want (red border should be scrollable div):
<div class="containerExample">
<div class="childExample">
</div>
</div>