开发者

How can I make my web application look correct in IE 8 and 9? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
开发者_运维技巧

Want to improve this question? Update the question so it's on-topic for Stack Overflow.

Closed 11 years ago.

Improve this question

I find that my application does not look as good in IE as in Chrome and Firefox. Perhaps it shows everything in wrong way. Well, I want to solve the issue I have.

So I try my hand with IE developer tool but I find nothing to customize styles and CSS. So how do others do these things for IE?

I mean, I don't care much how it works in 6, but how can I make it look like it does in Firefox and Chrome in IE 8 or 9?

Well, what trick do you use when you need to do something in IE? Well, I know nothing in web design but I want to refactor the existing code so that it works.

So, the thing is, how can I make them compatible with IE 8 or 9? Are their any tools that exist to make them work?


I get the best results by making my pages work in Chrome/Firefox (they tend to be similar) first, and then making adjustments to support Internet Explorer.

Sites like Position Is Everything are good for documenting shortcomings in IE's CSS support.

I make my .css files targeted at Chrome/Firefox, and include an additional stylesheet for each IE version using conditional comments.

For example:

<!--[if lte IE 7]> 
  <link href="/css/iefix7.css" rel="stylesheet" type="text/css" media="all" /> 
<![endif]-->


Using conditional comments, like @GavinH suggests, is a good way to serve IE different CSS than you serve to better-behaving browsers.

As for development, if you want better control over viewing source and fiddling with the styles and so on, try a stable version of Firebug Lite. You may use Firebug when you develop in Firefox, so it will be more like that than the IE Developer Toolbar.


One of the most important things you can do to ensure site looks close enough is to write standards compliant code for the doctype you have chosen, and validate that code throught w3's validator tool

After that, check out adobe's browser labs tool. You can view your site in any browser and make minor tweaks that you need.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜