Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #1490990

    Hi,

    We create a horizontal scroll for small screens:

    Could be possible that when the page loading the scroll will be in the middle?
    Many thanks.

    BR

    #1491076

    Hi,

    I think that I got it. I have add this code in a code block in the page:

    <script>
    window.addEventListener(‘load’, () => {
    let scrollElement = document.querySelector(‘.mapcontainer’);
    scrollElement.scrollLeft = (scrollElement.scrollWidth – scrollElement.clientWidth ) / 2;
    });
    </script>

    Thanks,

    BR,

    Antonio.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.