disable horizontal scroll css code example

Example 1: DISABLE the Horizontal Scroll

html, body {
    max-width: 100%;
    overflow-x: hidden;
}

Example 2: hide horizontal scrollbar css

.x-scroll-disabled {
	overflow-x: hidden;
}

Example 3: remove horizontal scrollbar css

overflow-x: hidden;

Example 4: disable scroll css

/* Answer to: "disable scroll css" */

/*
  You must set the height and overflow of the body, to disable
  scrolling.
*/

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden
}

Example 5: how to stop a page from scrolling horizontally

overflow-x: hidden

Tags:

Css Example