overflow-x: scroll, white-space: nowrap, and child elements set to inline-block or inline-flex. You want to create a horizontal scrolling section in Webflow that's responsive to scroll, touch, and cursor input, while also hiding scrollbars across all browsers.
Section element to your Webflow page.Div Block that will act as the horizontal scroll wrapper and set this wrapper to overflow-x: scroll and white-space: nowrap.Div Blocks or elements (like images or cards) that are inline-block or set to display: inline-flex.
300px) and only fit horizontally (no wrapping).
<head> or <body> tag and add this style inline:
```
<style>
.scroll-wrapper {
-ms-overflow-style: none; / IE and Edge /
scrollbar-width: none; / Firefox /
}
.scroll-wrapper::-webkit-scrollbar {
display: none; / Chrome, Safari and Opera /
}
</style>
```
```
<script>
const slider = document.querySelector('.scroll-wrapper');
let isDown = false;
let startX;
let scrollLeft;
slider.addEventListener('mousedown', e => {
isDown = true;
slider.classList.add('active');
startX = e.pageX - slider.offsetLeft;
scrollLeft = slider.scrollLeft;
});
slider.addEventListener('mouseleave', () => {
isDown = false;
slider.classList.remove('active');
});
slider.addEventListener('mouseup', () => {
isDown = false;
slider.classList.remove('active');
});
slider.addEventListener('mousemove', e => {
if (!isDown) return;
e.preventDefault();
const x = e.pageX - slider.offsetLeft;
const walk = (x - startX) * 2; // Adjust scroll speed here
slider.scrollLeft = scrollLeft - walk;
});
</script>
```
Build a horizontal scroll section using a div with overflow-x: scroll, use custom CSS to hide scrollbars, and optionally add custom JavaScript for cursor-drag support. This approach ensures compatibility across all browsers and input types.