Ato the container div renders a scrollbar inside it. Heres the corresponding CSS code for my example div backgroundcolor lightblue border 1px solid black height 100px width 500px overflowx scroll p width 1000px margin 10px Want to flesh out a fancy horizontal scrolling element CSS Tricks Codeburst and UX Collective all offer detailed tutorials you can reference for building custom containers. How to Disable Horizontal Scrolling If you do not set the width of the child element within its parent div the contents of the child element will wrap around to the next line avoiding overflow. You can also set the overflowx CSS property to hidden which prevents child content from wrapping within its container but turns off sideways scrolling. is to set the width of child elements to 100. This tells the child content to wrap around to the next line to avoid.
Getting clipped by the container edge no matter the width of the container. p width 100 Scrolling Sideways For most of us vertical scrolling is a reflex it just makes more sense than its horizontal alternative. However horizontal Digital Marketing Service scrolling does have a place in modern web design. When implemented sparingly and intentionally this method can help structure your pages and present content in a useful manner. Ultimately youre designing for the average visitor so usability precedes any stylistic embellishment. If you have doubts about your horizontal scrolling elements test them with real.
Users not fellow designers. If feedback is negative dont hesitate to fall back on a different approach. Editors note This post was originally published in September 2020 and has been updated for comprehensiveness. Free UX Research Kit Templates 3 templates for conducting user tests summarizing your UX research and presenting your findings. User Testing Template UX Research Testing Report Template UX Research Presentation Template Download for Free Learn more Topics Use20 of the Best Interactive Websites How to Make Your Own Anna Fitzgerald Anna Fitzgerald Updated April 01 2022 Published June 10 2021 The best websites are designed.