I 'm getting problem with designing by CSS on IE6,IE7,FireFox. A lot property on FireFox don't support on IE6. Please tell me about diffirence between IE6,IE7 and FireFox. If any, tell me a litte example about diffirence between them. Thanks so much

Dani AI

Generated

Browsers render CSS differently for a few repeatable reasons. As noted, each engine starts with its own default stylesheet; as pointed out, IE6 in particular has nonstandard behavior and IE7 only partly fixed it. The checklist below covers the specific bugs you will hit and quick, practical fixes.

Start with standards mode. Missing or quirks DOCTYPEs cause IE6/IE7 to use the old box model and make widths/padding behave oddly. Use a simple standards DOCTYPE at the top of your HTML:

<!DOCTYPE html>

Read why standards vs quirks matters: Quirks Mode and Standards Mode - MDN.

Common IE6/IE7 layout problems and fixes

  • Double-margin on floated elements: add display:inline to the floated selector to neutralize the IE6 bug.
  • Broken layout / collapsing: many IE bugs are caused by the internal hasLayout state. Trigger it with zoom:1 (IE-only) or by giving the element a width/overflow.
  • PNG24 alpha transparency: IE6 lacks full support. Use fallbacks or conditionally load fixes.

Quick examples:

.myfloat {
float: left;
margin-right: 10px;
display: inline; / prevents IE6 double-margin bug /
}

.clearfix {
zoom: 1; / triggers hasLayout in IE6/7 /
}

Targeting and testing

  • Put IE-only fixes in a small stylesheet included with conditional comments so modern browsers ignore them:

<!--[if lte IE 6]>
<link rel="stylesheet" href="ie6.css" />
<![endif]-->

  • Use a reset/normalize to reduce default-style differences; see normalize.css.
  • Check specific feature support on Can I use and consult legacy notes on QuirksMode.

Caution: IE-specific hacks solve symptoms but create maintenance cost. Prefer progressive enhancement, fallbacks, or small targeted fixes rather than sprawling browser-specific rules.

Recommended Answers

All 2 Replies

For one thing, they all use a different default style sheet. One suggestion to fix this is explained .
Also, is a list of styles and browsers that support them.

IE6 is not very standards compilent. IE7 is better, but still isn't as compliant as Firefox. Also, you should note that you need to design sites that are also compatible with Safari. This won't be an issue as Safari is now on the PC side, and as far as I can tell (I use both Windows and Mac OS X), it's not much different.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.