Issue
For instance, I have a div
, that is 10 000px by 10 000px
and I want it to fit on any screen, like its height and width would be 10 000px
and not just 100%
, but the scroll bar wouldn't be there and I wouldn't be able to scroll until the div
's bottom and right side
Solution
Wrap the div in another div. Give the wrapping div overflow: hidden; and max-height of maybe 100vh if that's what your going for.
.out {
overflow: hidden;
height: 100vh;
}
.in {
width: 10000px;
height: 10000px;
background-color: red;
}
Example: https://jsfiddle.net/p2c76y1s/1/
Answered By - João Paulo Macedo
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.