0

it's my today's work... that css :nth-child(odd){background-color:red;} doesn't work in lte ie8

<!DOCTYPE html>

<head>
    <link rel="stylesheet" href="style/selectivizr.css" type="text/css" />
    <meta charset="UTF-8">
    <title>Document</title>
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
    <!--[if (gte IE 6)&(lte IE 8)]>
        <script type="text/javascript" src="js/selectivizr-min.js"></script>
        <noscript>
            <style> p.odd {background-color:red;}</style>
        </noscript>
    <![endif]-->
</head>
<body>
<div id="container">
    <h1> title </h1>
    <p> 단락 요소입니다. 홀</p>
    <p class="odd"> 단락 요소입니다. 짝</p>
    <p> 단락 요소입니다. 홀</p>
    <p class="odd"> 단락 요소입니다. 짝</p>
</div>
</body>

  • You don't seem to have included the CSS that should be running here. The CSS you mention above would set the whole page to a red background in any browser that supports `nth-child`. Is that what you want? https://jsfiddle.net/tyst49oy/ – TylerH Jun 07 '17 at 14:06
  • I'm focusing on the selectivizr working in ie8 ==> #container : nth-child(odd) { whatever }. – 강한구 Jun 07 '17 at 21:42

0 Answers0