开发者

IE CSS behaves in a weird way

When I view the cart of my website in开发者_JS百科 Firefox the 'total' is in exactly the same place where it should be, but when I view it in IE 8 it is 60-80px below when the page is loaded. As soon as the mouse is clicked on the page the 'total' goes back to where it should be.

Why is this happening?

Is it the issue with CSS?


Some example markup would be helpful, but...

Make sure you're specifying a doctype in your markup, and that it is the first line of your HTML. Otherwise, IE will render in quirks mode.


If some of the elements in the page are generated by javascript or otherwise modified by javascript, I've noticed (especially in IE7 and older) that the DOM model and the actual screen repaint is sometimes out of synch and does not update unless you move the cursor above the incorrect part. Unfortunately I've found no foolproof workaround. Sometimes though, adding and immediately removing an element into the dom somewhere, can cause the page to repaint...

Debugging IE sure is fun! ;P

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜