HTML CSS Snippets Archive

How to Make Div Scrollable Horizontally

HTML <div class=”horizontal_scrollbar”> <div class=”horizontal_scrollbar_inner”> How to make a div scrollable horizontally? </div> </div> CSS .horizontal_scrollbar { background: #fff; overflow-x: scroll; width: 500px; padding: 10px; } .horizontal_scrollbar_inner { width: 800px; } Horizontal Scrollbar Demo  


How to Make Div Scrollable Vertically

HTML <div class=”vertical_scrollbar”> How to make a div scrollable vertically? </div> CSS .vertical_scrollbar { background: #fff; height: 100px; overflow-y: scroll } Vertical Scrollbar Demo