...

View Full Version : content moving to the left



mhunt
04-29-2006, 02:54 AM
if you go to http://mh-interactive.com/index.html
and look at the position of everything on the page, then click the contact link on the navigation you will notice that everything shifts slightly to the left and I can't figure out why
any one wanna help?

edit: it seems to only happen in firefox

Arbitrator
04-29-2006, 03:30 AM
The displacement is occurring because the extra content causes the scrollbar to appear. In order to keep your layout centered, Firefox is adjusting the position of your layout since you're using a percentage (I believe). To fix this try changing the properties of #container to:


div#container {
width: 528px;
position: relative;
margin: XXX auto 0 auto; /* where XXX is the height from the top of the page */
padding: 0 9px 0 11px;
}What I basically did is used the usual margin-left: auto; margin-right: auto; to center your layout instead. As an added note, you don't need to specify units when a value is zero since 0px, 0em, 0pt, et cetera are all the same thing: zero.

mhunt
04-29-2006, 03:35 AM
sweet that worked thanks

Arbitrator
04-29-2006, 03:48 AM
Actually you don't even need that position: relative; in there; I forgot to remove it, heh.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum