Gurebu Bokofu Gurebu Bokofu - 1 year ago 65
HTML Question

How to hide the DOM-element at the left of the <body> without horizontal scrollbar will appear?

Consider below


$(".block").animate({"left": "+=50px"}, "slow");

$(".block").animate({"left": "-=50px"}, "slow");

(source: jqbook)

enter image description here

This script allows to move the square to the left and to the right by buttons.
If we move the square out of to left, the horizontal scrollbal will not apper, however it will even if we define
and move the square to the right of the body canvas.

Could I move the DOM element to the right of the body without the horizontal scrollbar will appears?

Note: this problem is actulal for hamburger-menu. No problem if to hide it at the left of body(simple example in russian but you need code only), but how to hide the menu in the right of the body without scrollbar will appears?

Answer Source

Yes, you could do it. You can just simply add a CSS rule.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download