“Autoplay” HTML5 audio player on mobile browsers

This question has been answered in other places before. Regarding Apple devices specifically: Can you autoplay HTML5 videos on the iPad? “Apple has made the decision to disable the automatic playing of video on iOS devices, through both script and attribute implementations. In Safari, on iOS (for all devices, including iPad), where the user may … Read more

How to launch apps (facebook/twitter/etc) from mobile browser but fall back to hyperlink if the app isn’t installed

I think I’ve got a working solution. <!– links will work as expected where javascript is disabled–> <a class=”intent” href=”http://facebook.com/someProfile” data-scheme=”fb://profile/10000″>facebook</a> And my javascript works like this. note: there’s a little jQuery mixed in there, but you don’t need to use it if you don’t want to. (function () { // tries to execute the … Read more

Make scrollbar visible in mobile browsers

Try adding the below to your CSS, note that this is webkit specific: Demo Fiddle ::-webkit-scrollbar { -webkit-appearance: none; } ::-webkit-scrollbar:vertical { width: 12px; } ::-webkit-scrollbar:horizontal { height: 12px; } ::-webkit-scrollbar-thumb { background-color: rgba(0, 0, 0, .5); border-radius: 10px; border: 2px solid #ffffff; } ::-webkit-scrollbar-track { border-radius: 10px; background-color: #ffffff; }

forcing web-site to show in landscape mode only

@Golmaal really answered this, I’m just being a bit more verbose. <style type=”text/css”> #warning-message { display: none; } @media only screen and (orientation:portrait){ #wrapper { display:none; } #warning-message { display:block; } } @media only screen and (orientation:landscape){ #warning-message { display:none; } } </style> …. <div id=”wrapper”> <!– your html for your website –> </div> <div … Read more

Overflow-x:hidden doesn’t prevent content from overflowing in mobile browsers

Creating a site wrapper div inside the <body> and applying the overflow-x:hidden to the wrapper instead of the <body> or <html> fixed the issue. It appears that browsers that parse the <meta name=”viewport”> tag simply ignore overflow attributes on the html and body tags. Note: You may also need to add position: relative to the … Read more