user2559245
user2559245

Reputation: 77

How do I remove the horizontal scroll bar?

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

Answers (4)

Guruprasad J Rao
Guruprasad J Rao

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

Abdul Malik
Abdul Malik

Reputation: 2642

add this to a class and add that class to a div

.YourClass{overflow-y: scroll; overflow-x:hidden;}

Upvotes: 0

Tom
Tom

Reputation: 199

Insert the overflow-x:hidden; in CSS with the DIV, or whatever element, that has the scroll bar.

Upvotes: 0

tckmn
tckmn

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

Related Questions