Disable the Horizontal Scroll

DISABLE the Horizontal Scroll

Try adding this to your CSS

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

How to disable horizontal scrolling in html for the iphone

If CSS is acceptable for you instead of HTML:

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

Remove unwanted horizontal scroll (Where is the horizontal scroll coming from?)

the easiest answer is to put overflow-x:none in your App.css .

Disable horizontal scrolling without overflow hidden

Simply remove all the width you specified as this is the default behavior of block element to take 100% of width. And you need to pay attention as 100vh is not equal to 100%. The first one include the calculation of scrollbar :

* {  margin: 0;  padding: 0;  box-sizing: border-box;  max-width: 100vw;  font-family: 'Montserrat', sans-serif;  font-weight: 400;}
#nav { height: 100px; padding: 0 2vw; font-weight: 700;}
.p5_container { height: calc(100vh - 100px - 150px); background-color: beige;}
.arrow { height: 150px; background-color: #6195B2;}
<body>  <header id="nav">    <ul>      <li><a href="#">Circle</a></li>      <li><a href="#">Square</a></li>      <li><a href="#">Line</a></li>    </ul>  </header>
<div id="p5_banner" class="p5_container"></div>
<div class="arrow"></div> <div id="p5_circle" class="p5_container"></div>
<div class="arrow"></div> <div id="p5_square" class="p5_container"></div>
<div class="arrow"></div> <div id="p5_line" class="p5_container"></div></body>


Related Topics



Leave a reply



Submit