Scrolling div code generator
Enable scrolling for your divs to display content which may be too large for an areaFrequently asked questions
What's the difference between this and just setting overflow:auto myself?
Nothing under the hood - that's exactly what this generates. The generator just saves you writing and testing the width, height, border and padding CSS by hand, and lets you preview it before copying the code.
When should I use "auto" vs always showing a scrollbar?
This generator uses overflow:auto, which only shows a scrollbar when the content actually exceeds the box - the cleanest choice for most cases. Use overflow:scroll instead (edit the generated CSS) if you specifically want the scrollbar always visible, even when content fits, for a consistent layout width.
Can I put images or other HTML inside the scrolling area?
Yes - whatever you paste into the div contents box is placed inside the div as-is, so images, links, lists and other HTML all work normally.
Will this work well on mobile?
Yes, touch scrolling inside a fixed-size div works on all modern mobile browsers. Just make sure the width you set isn't wider than small screens - use a percentage width instead of a fixed pixel width if you want it to adapt.
