How to add a conditional scroll based on window size?

Posted by Jessica Taylor | Updated on

Want to add a conditional scroll based on window size? You can wrap everything into a media query which will apply from smaller devices such as mobiles, up to a maximum width you want the scrollbar to stop being displayed.

This way little workaround will only apply for devices with a maximum of 768px, on tablets or desktops will stop.


If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.

Related Questions & Answers