Reputation: 77
So i have been having some trouble with the horizontal scroll bar. Could someone tell me how to remove it? I have searched another answers and I got this:
overflow-y: scroll; overflow-x:hidden;
But I don't know how I apply it. Do I have to assign it to a class and then the class to a div tag? What exactly do I do? A answer would really be appreciated.
Upvotes: 0
Views: 242
Reputation: 29683
Its not necessary to assign it to a class.
There might be two ways to do it.
Way 1:
<div style="overflow-y:auto;overflow-x:hidden">
Way 2:
Just create a class in css:
.divstyle{
overflow-y:auto;
overflow-x:hidden
}
and then assign that class to div like:
<div class="divstyle"></div>
Both will work well... :)
Upvotes: 1
Reputation: 2642
add this to a class and add that class to a div
.YourClass{overflow-y: scroll; overflow-x:hidden;}
Upvotes: 0
Reputation: 199
Insert the overflow-x:hidden;
in CSS with the DIV, or whatever element, that has the scroll bar.
Upvotes: 0
Reputation: 59343
I'm assuming you want to prevent the horizontal scroll bar on the entire page. If so:
body {
overflow-y: scroll; overflow-x:hidden;
}
Upvotes: 0