Posts

Hide scrollbar, but still scrollable (using CSS)

  I made a post about this topic by using javascript on mouse wheel event, then by calculating delta status we can trigger function that performs scroll up/down via window.scrollTo object.  Use layer element. This is a neat technique since we can adjust layer positions = top, left, and.. right to hide the scroll bar when not needed .   Actually, it’s a good technique, I use it since 2007, but the challenges are: – different delta calculations for different browser – need a decent function to perform a good/realistic mouse scroll up/down response. I found somewhere on the internet the other technique, using CSS. Fewer codes, cross-browser, and use the native mouse scrolling feature, here are the codes <html> <head> <style> html, body { padding: 0; margin: 0; overflow: hidden; } #container { position: absolute; left: 0; top: 0; right: -30px; bottom: 0; padding-right: 15px; overflow-y: scroll; } </style> ...