简体   繁体   中英

Does IE8 have rendering bugs like 6 or 7?

Does IE8 have rendering bugs like IE6 or IE7? If I make my site render correctly in Firefox 3.5, will it look the same in IE8, or will additional changes / hacks / etc be needed?

I want to make my site IE8 compatible. Do I need to do something extra for that?

Update: 6 march 2010

Is there a possibility that I will have to add conditional CSS for IE8 or not?

All browsers have their various quirks and no browser is guaranteed to display or act the same as another. While W3C is making great strides to expand the functionality that should be standardized, many RFCs are not yet to the Recommendation stage , which is the stage that means it will no longer change and are more likely to be acceptable standards to develop on. Because of this, it is imperative that you ensure your site works in, at minimum, the browsers within your focus group .

First, use reset.css or normalize.css . Both try to serve the same goal (consistency fixes between browsers), but each attacks the problem from different angles. So make sure you choose the one that works best for you. While not perfect, they get pretty darn close in all browsers, which is more than you can say without it.

Second, check out QuirksMode to see the various browser compatability with standards (whether those standards are in recommended stage or not). This is where you can decide on the features you will use that match the compatibility with your focus group.

Third, with your new power of a 'consistent' css base, and knowledge of what browsers support what, be sure to read, embrace, preach, and apply progressive enhancement techniques (see articles I like on it below). The power of progressive enhancement is to use what does work instead of trying to shoehorn a fat foot into a slim shoe.

Articles on progressive enhancement:

  1. http://www.alistapart.com/articles/understandingprogressiveenhancement
  2. http://www.alistapart.com/articles/progressiveenhancementwithcss
  3. http://en.wikipedia.org/wiki/Progressive_enhancement

Lastly, install any other browsers that you consider in your focus group. Doing so will allow you to test, without question, the appearance on the page.

On windows, I recommend installing IE9 to be able to switch rendering modes to older versions of IE. While these rendering modes are not perfect, in most cases they can be just as reliable as the real thing. If you cannot install IE9, I feel sorry for you, but, luckily, IE8 gives you similar power for rendering modes.

On anything else (or even windows if you want the real IE browsers rather than emulation), you need to get a windows virtual instance running. There are many ways to get then and MS even provides various images of instances specifically for developers to be able to test old versions of IE. See this blog post for more details on where to get the MS supplied IE6 and IE7 VPCs.

Using these tools you should be more than able to develop a design that will look -- no -- work and degrade gracefully in 100% of browsers and validate that it is implemented correctly. While it can be a bit daunting, this will greatly reduce the chance of display/js related bug upon release.

Yes, IE 8 still has some rendering bugs. Most of them are fixed, but I think that these for example are still there:

  • The text-align attribute is applied to block elements, not just inline elements.

  • Content of elements is still one character high even if there is no content.

Of course it also depends on what doctype you are using. Without a proper doctype the page renders in quirks mode, which pretty much throws the browser back to IE 4.

If you are using different style sheets for different browser/version combinations, you will need another one. IE 8 doesn't behave exactly as any other browser or IE version. I always use a single style sheet for all browsers, and I didn't have to make any changes at all to it to make it work for IE 8.

Expanding on @Kevin's and @James' answers, another good resource is Browser Shots to get screen captures of your site on different browsers and platforms. Very useful for testing browsers/versions that you don't have access to, especially for tricky CSS layouts.

I've used it to view output for Mac and Linux browsers since I work in a Windows-only shop.

Note that the URL must be externally accessible; if you're developing on your local box you'll need to poke a hole through your firewall and maybe setup a dynamic DNS name instead of an IP address.

Edited I moved one paragraph and rewrote it based on some feedback.

If you explore http://quirksmode.org you will find compatibility pages that explain the differences between various browsers, including Firefox 3.5 and IE8.

Most likely you will be making changes, but that will depend on what you are using, as there are many similarities, that won't require changes.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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