开发者

Cross-browser compatibility problem with IE

开发者 https://www.devze.com 2023-01-18 14:34 出处:网络
My site is incompatible with IE. How can I fix this pr开发者_运维技巧oblem? you can have separate css style for your ie so load the css on the browser identification, socailly ie6 have problem with

My site is incompatible with IE. How can I fix this pr开发者_运维技巧oblem?

Cross-browser compatibility problem with IE

Cross-browser compatibility problem with IE


you can have separate css style for your ie so load the css on the browser identification, socailly ie6 have problem with floating div's threat them different , positioning with absolute and relative is the key.

ie 8 behave different in firefox nested divs inherit css from parent but ie8 need you to specify the css for that div

use : < br clear="all" />

between floating div's to clear last floating div effect on next div's


Difficult to tell for sure without looking at the code. I would g guess that you either have an issue with your floats as previously suggested. Search clearfix as a possible remedy which you could apply to the container holding the floated assets.

The second thing I would look for is an unclosed tag ie missing </div> or really many open tags could break and cause it to look like this in IE


Looks like a css float issue to me. IE handles floats differently than other good browsers. A quick google will get you tonnes of info on that.


You need to learn to create websites in a cross-browser friendly manner from the scratch code. This question is too vague to be asked in a specific manner.

Try to use less of those "hacks" and stick with standard-compliant XHTML/CSS coding. Starting with a good CSS framework (such as text reset css files etc. that float around the web) is a good idea. I often use the 960 grid system.


If you want a quick fix and can use javascript you may find this interesting: http://code.google.com/p/ie7-js/. It's a script that "upgrades" Internet Explorer so that it will act as a newer version.

I hope this helps you, Alin


If you coded the floats right ( between sets of floats) and maintained the width of each element then here are some fixes that can help you solve your issues:

• Double margin for floating element – add “display: inline;” to div.

• Floats not aligned – add width (not auto) to element.

• Double padding – add “display: inline-block;” to div.

• Negative margin image cut off – add “position: relative;” to div.

Some or all of them may help you.

It'll be more easy to help if you provide us with a live view of your site.

0

精彩评论

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