0

I have a container div who's content is quite large. The container is set to position: relative. The content has another div which I would like for it to be fixed with respect to the container horizontally--it should still scroll vertically.

When I set the div in question to:

position: absolute;
left: mypreferredleftpx;

I got weird results.


http://jsfiddle.net/Ey7vU/3/:

PRETTY PICTURE should scroll vertically, but not horizontally. It should remain fixed horiztontally with respect to the container.

Community
  • 1
  • 1
TheOne
  • 10,819
  • 20
  • 81
  • 119

1 Answers1

0

Remove

position:relative

from .container

Updated fiddle here.

codingrose
  • 15,563
  • 11
  • 39
  • 58