-1

I have created a div with an image inside. When clicked it resizes the div and places a larger image in. The side effect of this seems to be that the wrapper div moves a little to the left.

I have tried a few things but here is the code. Hope you can help.

http://jsfiddle.net/iamjasonlucchesi/3FuJ6/2/

Please make sure you can see the margin between the body and the Wrapper before testing the code. Also note images dont work as I have not put them in.

Jason
  • 145
  • 5
  • I'm not seeing it with FF9. You do realize that the `normalized` checkbox applies a CSS reset? Also, none of your images are working, as they're relative and not absolute. – Jared Farrish Jan 08 '12 at 19:24
  • Which margins are you talking about and which browser are you seeing this in? Not seeing anything in Chrome here. – jfriend00 Jan 08 '12 at 19:26
  • An image that works? Still not seeing it (I suppose the real image might make some difference). http://jsfiddle.net/3FuJ6/4/ – Jared Farrish Jan 08 '12 at 19:31
  • 1
    Still does not work on Jared Farrish verson, though he has a image on there is you want to look. – Jason Jan 08 '12 at 20:36
  • This is what I see: http://imgur.com/659xd I don't know who added a `+1` to that comment, but explaining it would help. – Jared Farrish Jan 08 '12 at 21:21
  • Please post an image that demonstrates the actual problem, and *provide more information on the **browser** you're using and any other environment-specific information*. I don't see the problem; until you show me something where I can replicate, I don't know how to help. – Jared Farrish Jan 08 '12 at 21:28
  • Been working a little more with it today and found the problem. Seems its the scorll bar. Depends on the Browser as IE always has it there. But when the page expands beyond the height, it puts the scroll bar in and for some reason this effects the wrapper and pushes the content slightly to the side. Probably because of the auto in the width. – Jason Jan 16 '12 at 18:31

1 Answers1

0

The problem is a Horizontal Jump, caused by no scroll bar being displayed in some browsers. The link below is how to solve it. http://css-tricks.com/eliminate-jumps-in-horizontal-centering-by-forcing-a-scroll-bar/

Jason
  • 145
  • 5