Div overflow scroll horizontal only

Another is to use white-space:pre-wrap; in the CSS for your tag. overflow-x:scroll; except the scrollbars only appear if required. 1 html - Div with horizontal scrolling only - Stack Overflow WebTo ensure we get a horizontal scroll bar, we'll turn on overflow-x. And that's pretty much it. 2 How To Force / Always Show Scrollbars Add overflow: scroll; Try it Yourself» To only show the vertical scrollbar, or only the horizontal scrollbar. 3 It has three possible values: start, center, and end. These are relative to the. 4 The.x-scroller DIV will be dynamically generated in a loop with her contents, each of the x-scroller DIV will equally have some contents which I will like to be able to scroll in horizontal direction only as can be seen in the picture below: html css Share Improve this question Follow edited at asked at Paullo. 5 Use overflow-x: hidden and overflow-y: scroll, or overflow: hidden scroll instead. -moz-hidden-unscrollable Use overflow: clip instead. As of Firefox 63, -moz-scrollbars-none, -moz-scrollbars-horizontal, and -moz-scrollbars-vertical are behind a feature preference setting. In about:config, set d to true. 6 .horizontal-scroll-wrapper > div { width: px; height: px; } Step 2) Rotating the container Now we rotate the container degrees with a CSS transform. And there you have it: a horizontal ntal-scroll-wrapper { transform: rotate(deg); transform-origin: right top; }. 7 Setting the value to scroll, the overflow is clipped and a scrollbar is added to scroll inside the box. Note that this will add a scrollbar both horizontally and vertically (even if you do not need it): You can use the overflow property when you want to have better control of the layout. 8 For example in the demo below the horizontal overflow can be scrolled through whilst the text that extends beyond the height of the box is { overflow-y: hidden; overflow-x: scroll; } Clearing floats One of the more popular uses of setting overflow, strangely enough, is float clearing. 9 The overflow-y property of CSS adds a scroller when needed, If we want to add the scroller after a specific height (e.g px in our case) Then, max-height: px; We add the max-height property of CSS so for example to add a scroller after px of height then max-height: px; is used. html white-space: nowrap 10 html - Div with horizontal scrolling only - Stack Overflow WebFor horizontal scroll, keep these two properties in mind: overflow-x:scroll; white-space. 11