国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

Home Web Front-end CSS Tutorial How to Completely Disable Horizontal Scrolling on Your Website?

How to Completely Disable Horizontal Scrolling on Your Website?

Nov 02, 2024 am 05:22 AM

How to Completely Disable Horizontal Scrolling on Your Website?

How to Completely Disable Horizontal Scrolling

To physically disable the horizontal scroll feature on your webpage, follow these steps:

  1. CSS Rule in HTML Tag:

    • In the tag, specify both max-width: 100%; and overflow-x: hidden; CSS rules to ensure that the page cannot exceed the width of the browser window and that horizontal scrolling is disabled.
  2. Complete CSS Code:

    <code class="css">html, body {
        max-width: 100%;
        overflow-x: hidden;
    }</code>
  3. Implementation:

    • Include the CSS code in an external stylesheet or add it to the