Fully compatible with the CSS HACK wording IE6/IE7/IE8/FF

Browser market chaos caused great trouble to designers, design pages compatible browsers have to complete this compatible with the browser, would have ie6 compatible with ff is easily among the solutions. Would be trouble spots with a ie7, ie8 even the appearance of headache, and not the original hack ie7 method can be used, how should we do?

The first method:

Fortunately, Microsoft provides such a code:

<meta http-equiv="x-ua-compatible" content="ie=7" />
<head> Put this code inside the page inside the ie8 ie7 resolution up Jiugen exactly the same, so basically you can ignore the ie8, rest of the code only needs to write on it

background: # ffc; / * effective against firefox * /
* Background: # ccc; / * on ie7 valid * /
_background: # 000; / * valid only for ie6 * /
Explain it:

firefox can parse the first paragraph, the latter two because preceded by a special symbol "*" and "_", firefox can not recognize, it only recognized background: # ffc, see is yellow;

ie7 can identify the first two short, to the last subject, so the final analysis is the background: # ccc, see is gray;

ie6 three sections can be identified, and "_" the only ie6 will recognize, the final resolution is _background: # 000, see is black

Amen! Already is the simplest and best understood of the wording, if you are coming in google, I can responsibly tell you that this method is ok, I've tested.

ie8 compatibility of that period of 7 I tested the code, and in my present windos 7 brought the ie8 beta no problem, since the official version of ie8 also control whether to use them do not know.

ps: If you find written by me, or have questions, please check your html head, take a look at the contents of <head> is not the case prior to the standard formulation

<! DOCTYPE html PUBLIC "- / / W3C / / DTD XHTML 1.0 Transitional / / EN" " http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">
<Html xmlns = " http://www.w3.org/1999/xhtml ">

This is now a fairly standard formulation, if the page you are using dreamweaver to do so, the default is of such norms, remember, this non-standard writing style, and compatibility can not guarantee

The second method:

Demanding friend is reluctant to increase the head of the page <meta http-equiv="x-ua-compatible" content="ie=7" /> such a code, because this result is that each page had to increase . To these so-compatible browsers really need to find another solution. Site released a day earlier "perfect compatible with ie6, ie7, ie8 and firefox's css transparent filters", may then test the negligence, IE8 does not solve the compatibility, a lot of friends responded that not take. Out some time today, A lot of information, finally solved the problem.

The following are compatible IE6/IE7/IE8/FF wording, note the following order can not be reversed

margin-bottom: 40px; / * ff attributes * /
margin-bottom: 140px \ 9; / * IE6/7/8 attributes * /
color: red \ 0; / * IE8 support * /
* Margin-bottom: 450px; / * IE6 / 7 of the properties * /
Following the form of an instance, we can run the code check effects

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>2010 The latest fully compatible with ie6, ie7, ie8, FF  CSS HACK Writing  --www.ietester.net</title>
<style type="text/css">
#abc {
 border:2px solid #00f;     /*ff Property  */
 border:2px solid #090\9;   /* IE6/7/8 Property   */
 border:2px solid #F90\0;     /* IE8 Support   */
 _border:2px solid #f00;     /*IE6 Property  */
 }
 /* Upper and lower order cannot write wrong  */
 </style>
</head>
<body>
<div>
  <ul>
    <li>FF Under the blue side  </li>
    <li>IE6 Under the Red edge  </li>
    <li>IE7 Under the Green edge  </li>
    <li>IE8 Under the yellow edge  </li>
    <li> Please mark to reprint  www.ietester.net</li>
  </ul>
</div>
</body>
</html> 
  • del.icio.us
  • StumbleUpon
  • Digg
  • TwitThis
  • Mixx
  • Technorati
  • Facebook
  • NewsVine
  • Reddit
  • Google
  • LinkedIn
  • YahooMyWeb

Related Posts of Fully compatible with the CSS HACK wording IE6/IE7/IE8/FF

  • JavaScript inheritance

    About JavaScript inherited a small example ... <! DOCTYPE HTML PUBLIC "- / / W3C / / DTD HTML 4.01 / / EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <meta http-equiv="Content-Type" conte ...

  • JavaScript String Functions Guinness

    Own JS function 1.Asc (x), Chr (x): convert characters, character code 2. Filter: Search string array of a specific string Format: v = filter (x, s [, include [, compare]]) Examples: Dim x ()={" kjwang "," wangkj "," peter ")

  • EJB ant script to deploy template works

    <? xml version = "1.0" encoding = "UTF-8"?> <! - Name Project name basedir build.xml file directory -> <project name="HelloWorld" basedir="."> <! - Property variables -> <! - The sour ...

  • NoClassDefFoundError: javax / servlet / Servlet

    In the project in order to achieve a listener in web.xml set up a listener, did start in Tomcat actually occurred after java.lang.NoClassDefFoundError: javax / servlet / ServletContextListener this anomaly google and found the reasons for the lack of serv

  • Dynamic loading JS script four kinds of methods

    To achieve dynamic loading JS script has four kinds of methods: 1, direct document.write <script language="javascript"> document.write ( "<script src='test.js'> <\ / script>"); </ script> 2, dynamic scri

  • java read file

    java read documents in two ways: java.io and java.lang.ClassLoader When using the java.io, when java.lang.ClassLoader use it? (Note: If prior to read xml file java read file clearly aware of these two methods have been like! Can take much less to understa

  • spring + hibernate + oracle9i to read and write CLOB

    Database-driven update classes12-9i.jar Hibernate modify the configuration of the following code <bean/> <bean Lazy-init="true"> <property name="nativeJdbcExtractor"> <ref local="nativejdbcExtractor"/>

  • Process migration from tomcat to websphere changes

    Process migration from tomcat to websphere changes Because customers use the web application server software used by different what tomcat5, tomcat6, websphere5.1, websphere6.1, weblogic8, and so on, and the software used inconsistent standards, ibm's

  • Java technology: Eclipse explain the use of techniques

    Editor settings: Window -> Preferences -> Java-> Editor appearance: Display line number, emphasizing symmetry shown in square brackets, to emphasize that the existing line to show Print Margins its check, Tab width set 4, print made from the fiel

  • The level Hibernate cache

    Hibernate cache level: (1) a cache is very short and the session life cycle consistent, also known as session-level cache-level cache or transaction-level cache (2) Ways of Supporting level cache: get (); load (); iterator (); only entity object cach ...

blog comments powered by Disqus
Recent
Recent Entries
Tag Cloud
Random Entries