简体   繁体   English

ie8 div在页面加载后跳转

[英]ie8 div jumps after page load

I have the following setup. 我有以下设置。 1 column with a left floated inner column and a right floated inner column. 1列,其中左浮动内部列和右浮动内部列。 Works very well on firefox. 在Firefox上效果很好。 IE does something strange. IE做一些奇怪的事情。

I have parts in the left column that is loaded from weather.co.za with javascript. 我在左栏中有从weather.co.za用javascript加载的部分。 The right column has an ad loaded and displayed with jQuery. 右栏有一个广告加载并显示在jQuery中。

On initial load everything is fine. 初始加载时一切正常。 Right column displays as it should. 右列应显示。 As soon as the javascript in the left column or right column displays the content the right column "jumps" 10px to the left. 左列或右列中的javascript一旦显示内容,右列就会“向左跳10px”。

I have checked and do not seem to find any code that would cause the jump. 我已经检查过了,似乎没有找到任何会导致跳转的代码。

I am still learning as I go along, please help! 我仍在学习中,请帮助!

Had margin-left:10px. 左边距为:10px。 changed that to padding-left:10px; 将其更改为padding-left:10px; now it is working! 现在它正在工作!

In my case ( trying in IE 7 ) I had to change: 就我而言( 在IE 7中尝试 ),我不得不更改:

margin-left: 6.35em;

to

margin-left: 90px;

em to px ... doing so no more jumping happens after page load. empx ...这样一来,页面加载后就不会再发生跳跃了。 IE is really really bad! IE真的很糟糕!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM