I would like to remove myself scrollbar
from the user's view, as currently I don't know why it is that when an error is marked a box appears above my form and therefore moves a few pixels to my form and that in this movement where the scrollbar
horizontal in the bottom of my form appears, I would like to know if there is a way to hide the scrollbar
, so that it is no longer visible.
Example image:
It is true that with
overflow: hidden;
can be solved, but I think it is not the correct method, since in this way you are disabling the scroll inside that<div>
but in your case it does not matter since it is not necessary to scroll , but... what would happen if you add more content and you need to scroll and at the same time hide the scroll bar ?With the following CSS style you solve it:
This will hide all the scrollbars, but then if you want you can apply that style to just one element with an id or a class.
I hope it helps
You can do it with CSS with
overflow: hidden;
You can use the attribute
overflow: hidden;
to hide the horizontal and vertical scroll bar .If you only want to hide your horizontal scrollbar , you can use the or attribute
overflow-x: hidden;
for the verticaloverflow-y: hidden;
case .Although the question is somewhat old, I think I have to answer because the answers that have been given are basically a patch. We have two questions then:
width: calc(100% - [valor del margin]*2)
To remove the vertical scroll put this code in your style.css file You won't need JavaScript. Try it: