Is there a way to prevent horizontal page scroll on a mobile device preferably with CSS only?
Here\'s an example: http://jsfiddle.net/YfLst/15/
Update:<
With jQuery mobile the order of the css files matters. What I had to do is make sure that I included my theme css before the jQuery Mobile css instead of after it like this:
If you look in jQuery Mobile's css, you'll see code to prevent horizontal scrolling:
body.ui-mobile-viewport, div.ui-mobile-viewport {
overflow-x: hidden;
}
You don't even have to add any classes to your body tag. jQuery mobile does it automatically.