title: Scroll left if user scroll down ( horizontal scrolling )
body: <p>I'm working on a website that is horizontal and I need to make horizontal scrolling when user scroll down. Any ideas how to make that with javascript?</p>
  
  <p>Here is fiddle: <a href="https://jsfiddle.net/erqbtL23/" rel="nofollow noreferrer">https://jsfiddle.net/erqbtL23/</a></p>
  
  <p>Here is code:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-css lang-css prettyprint-override"><code>body {
    margin: 0;
    height: 100vh;
  }
  
  * {
    box-sizing: border-box;
  }
  
  .container {
    overflow-x: auto;
    white-space: nowrap;
  }
  
  .container&gt;div {
    background: red;
    display: inline-block;
    width: 100vw;
    height: 100vh;
    margin-left: -4px;
  }
  
  .container&gt;div:first-child {
    margin-left: 0;
  }
  
  .container::-webkit-scrollbar {
    display: none;
  }
  
  .container&gt;div:nth-child(even) {
    background: blue;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div class="container"&gt;
    &lt;div&gt;scroll left&lt;/div&gt;
    &lt;div&gt;lorem&lt;/div&gt;
    &lt;div&gt;lorem&lt;/div&gt;
    &lt;div&gt;lorem&lt;/div&gt;
    &lt;div&gt;lorem&lt;/div&gt;
    &lt;div&gt;lorem&lt;/div&gt;
    &lt;div&gt;lorem&lt;/div&gt;
    &lt;div&gt;lorem&lt;/div&gt;
    &lt;div&gt;lorem&lt;/div&gt;
    &lt;div&gt;lorem&lt;/div&gt;
    &lt;div&gt;lorem&lt;/div&gt;
    &lt;div&gt;lorem&lt;/div&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>