I want to display scrollbar while the mouse hover the container, if the contents inside the container overflows the container.
The below code works good in chrome but doesn't work in firefox, because it doesn't suppport overlay property.
<style type="text/css">
.container {
overflow:hidden;
}
.container:hover {
overflow:overlay;
}
</style>
<div class="container">
contents
</div>
I tried using overflow:auto
on hover but it changes the alignment of text inside the container while mouse hovers.
Is there any way to achive my need in all browsers?