I'm having trouble getting my CSS to respond to a :hover
event.
Here's the CSS code I have:
<style>
.hidescroll
{
}
.hidescroll :hover
{
overflow-x: auto;
}
</style>
And here's the HTML code:
<div class="hidescroll" style="width:100%; height:100px; background-color:green; overflow-y:hidden; overflow-x:hidden;">
<div style="width:300%; height:100px; background-color:red; ">abc</div>
</div>
I was expecting the scrollbar to appear when I hover over the div, but it doesn't. Why is that? (I even tried adding div
before :hover
, but that didn't work either.)