View Full Version : Main body shifted to the left only in IE and Opera

01-06-2010, 06:45 AM
Hello there. I've been in the process of rebuilding the look of my website and I've come across a problem I can't seem to figure out. Instead of the main body staying centered in the browser, it shifts approx 180px to the left in Internet Explorer and Opera. Firefox, Chrome, and Safari on the other hand all display the website centered correctly as it should be.

I know the reason for this. I have placed a few pop-out button links on the side of the page. The <div> code for the buttons are located inside the header, then positioned into place beside the main body using the margin. The reason the <div> code is inside the header is because if I put it anywhere else, such as the sidebar or the main body, the entire body shifts even more to the right in all browsers.

Screen shots:
Firefox (http://techunfolding.com/site/wp-content/uploads/2010/01/screen_shot_firefox.jpg)
IE 8 (http://techunfolding.com/site/wp-content/uploads/2010/01/screen_shot_internetexplorer.jpg)
Opera (http://techunfolding.com/site/wp-content/uploads/2010/01/screen_shot_opera.jpg)

I've been trying to find different ways to solve this. I've tried looking for an IE fix that will make the button objects visible, but not take any space on the page. The other solution I've tried doing is a browser specific hack that will hide the button objects completely from all IE and Opera browsers. Unfortunately I don't fully understand how to use the hacks properly. (I'm self taught)

If anyone can help me out with a solution to this, or help point me in the right direction, I'd greatly appreciate it.

As I've said before, Firefox, Chrome and Safari all display the site correctly. Only IE and Opera are giving me this problem.

- Dan

Edit: I've found a solution by simply moving the buttons up into the header. It wasn't my original plan, but it fixes the problem.

01-06-2010, 12:07 PM
Images are not enough. We need to see the code. After all there might be an error in the code, isn't that?

A link to a test page will be even better.

01-06-2010, 12:14 PM
A link to a test page will be even better. It's viewable from the screen shots. :)

01-06-2010, 12:22 PM
It's viewable from the screen shots. :)
Oh, dear me. Never thought of that :)