0

On a simple mobile page, i tested on iOS safari have some overflow div using

div {position:absolute; right:-2em; /* or */ left: -3em;}

if i set the body using

body {width:100%; overflow-x: hidden;}

it only hide the scroll bar, but still able to pan to the right; but if I do

html {overflow-x: hidden;}

it dose the trick but make scrolling very laggy. prob something simple that i overlooked. thanks

enter image description here

aahhaa
  • 2,240
  • 3
  • 19
  • 30

1 Answers1

0

EDIT:
sorry I didnt read your question correctly but try changing the block's position to this instead:

position:fixed;

it does what you want but that block will stay in that spot when you scroll up and down.
try that and see if it is what you wanted.

Paradox
  • 26
  • 4
  • I am trying to prevent it to scroll to the right of my 100% width. – aahhaa Nov 17 '14 at 21:26
  • I'm very sorry I did not read it correctly. one way that will work is changing the block that is position:absolute; to position:fixed; although it works for what you want it fixes it in that spot when you scroll up and down. try that and see if that helps. – Paradox Nov 18 '14 at 16:25