HTML/CSS/IE Firefox/IE

Материал из Web эксперт
Перейти к: навигация, поиск

Bug fix for IE

 
<!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></title>
<style type="text/css" media="Screen">
body {
    margin: 0;
    padding: 10px;
}
</style>
   
<!--[if gte IE 5]>
<style type="text/css">
html, body {margin:0; width:160px;}
</style>
<![endif]-->
</head>
<body>
    <p>this is a test. this is a test. this is a test. this is a test. </p>
</body>
</html>



[if ie]

 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
                      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
    <head>
        <title>cursor</title>
        <style rel="stylesheet" type="text/css">
div {
    width: 50px;
    height: 50px;
    border: 1px solid rgb(234, 234, 234);
    margin: 5px;
    cursor: url("custom_cursor.png"), default;
    background: mistyrose;
}        
        </style>
        <!--[if ie]>
            <style type="text/css">
                div {
                    cursor: url("custom_cursor.cur"), default;
                }
            </style>
        <![endif]-->
    </head>
    <body>
        <div></div>
    </body>
</html>



[if lt IE 7]

 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
                      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
    <head>
        <title>Conditional Comments</title>
    </head>
    <body>
        <!--[if lt IE 7]>
            <p>
               This text is only seen by IE 6.0, IE 5.5, and IE 5.0, but not IE
               7.0.  Other browsers just ignore this altogether, since it"s
               contained in HTML comments.
            </p>
        <![endif]-->
        <!--[if IE 6]>
            <p>
                This text is only seen by IE 6.0.
            </p>
        <![endif]-->
        <!--[if gt IE 6]>
             <p>
                This text is only seen by IE 7.0.
             </p>
        <![endif]-->
    </body>
</html>