I have inline-block divs however when they reach end of the screen, they go the next line instead of scrolling horizontally, can someone help me out? here is a fiddle
<
What about a bit more state-of-the-art solution using transform?
HTML
item 1
item 2
item 3
item 4
item 5
item 6
item 7
item 8
item 9
item 10
CSS
div {
box-sizing: border-box;
}
.horizontal-scroll-wrapper {
background: #abc;
display: block;
max-height: 500px;
overflow-y: auto;
overflow-x: hidden;
padding-top: 60px;
position: absolute;
transform: rotate(-90deg) translateY(-80px);
transform-origin: right top;
}
.horizontal-scroll-wrapper > div {
background: #cab;
height: 60px;
margin: 10px;
padding: 5px;
transform: rotate(90deg);
transform-origin: right top;
width: 60px;
}
CodeSandbox, inspired by https://css-tricks.com/pure-css-horizontal-scrolling/