how to do horizontal scroll css code example

Example 1: css how to remove horizontal scrollbar

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

Example 2: remove horizontal scrollbar css

overflow-x: hidden;

Example 3: horizontal scroll html

<div class="scrolling-wrapper">
  <div class="card"><h2>Card</h2></div>
  <div class="card"><h2>Card</h2></div>
  <div class="card"><h2>Card</h2></div>
  <div class="card"><h2>Card</h2></div>
  <div class="card"><h2>Card</h2></div>
  <div class="card"><h2>Card</h2></div>
  <div class="card"><h2>Card</h2></div>
  <div class="card"><h2>Card</h2></div>
  <div class="card"><h2>Card</h2></div>
</div>
.scrolling-wrapper {
  overflow-x: scroll;
  overflow-y: hidden;
  white-space: nowrap;

  .card {
    display: inline-block;
  }
}

Tags:

Css Example