0

IE固有のCSSファイルでは、テキストはそれ自体の上にスタックされます。ここを参照してくださいここを参照してください

これはIEでのみ発生し、他のブラウザでは発生しません。これがIE固有のCSSです

h2 {
font-family: 'Paytone One', sans-serif;
font-size: 30px;
position: relative !important;
top:-150px !important;
left:-250px !important;
color: black;
}
h3 {
font-family: 'Paytone One', sans-serif;
font-size: 20px;
position: relative !important;
top:150px !important;
left: 100px !important;
}
.image2 {
position: relative !important;
bottom:100px !important;
left: 100px !important;
}
.box1 {
width: 100%;
height: 5px;
background-color:  #FC3B3B;
position: relative !important;
bottom:0px !important;
left: 0px !important;
}
p {
position: relative !important;
bottom:0px !important;
left: 0px !important;
font-size: 15px;
font-family: arial;
color: #585858;
}

どうすればこれが起こらないようにすることができますか。!importantを追加してから発生し始めましたが、これを削除すると位置を定義できません

編集。これが私のページのHTML部分です

  <!DOCTYPE html>
<head>
<link href='http://fonts.googleapis.com/css?family=Paytone+One' rel='stylesheet' type='text/css'>
<title>Louis Moore | Creating The Future  </title>
<!--[if IE]>
<link rel="stylesheet" type"text/css" href="ie.css" >
<![endif]-->

</head>
<style>
.box {
background-color: #F1F2F2;
border: 1.5px #D1D3D4 solid;
position: relative;
top: 100px;
height:450px;
width:100%;
}
.image1 {
position: absolute;
top:-100px;
left: 400px;
}
body{
font-family: 'Paytone One', sans-serif;
font-size: 30px;
}
h1 {
font-family: 'Paytone One', sans-serif;
font-size: 40px;
position: absolute;
top:150px;
left: 400px;
}
h2 {
font-family: 'Paytone One', sans-serif;
font-size: 30px;
position: absolute;
top:200px;
left: 500px;
color: #FC3B3B;
}
h3 {
font-family: 'Paytone One', sans-serif;
font-size: 20px;
position: absolute;
top:300px;
left: 400px;
}
.image2 {
position: absolute;
top:370px;
left: 600px;
}
.box1 {
width: 100%;
height: 5px;
background-color:  #FC3B3B;
position: absolute;
top:560px;
left: 0px;
}
p {
position: absolute;
top:600px;
left: 100px;
font-size: 15px;
font-family: arial;
color: #585858;
}
</style>


<body>
<div class="box">
<img src="louis.png" class="image1" alt="." width="400px" height="400px">
<h1> WELCOME TO MY PAGE<h1> 
<h2>COMING SOON... <h2>
<h3>BUT FOR NOW FOLLOW ME ON TWITTER</h3>
<a href="http://twitter.com/louismoore18"><img src="twitter.png" class="image2" border="0" alt="."></a>
</div>
<div class="box1">

</div>
<p>louismoore.net © All rights reserved 2012</p>
</body>
</html>
4

1 に答える 1

0
    <!DOCTYPE html>
    <head>
    <link href='http://fonts.googleapis.com/css?family=Paytone+One' rel='stylesheet' type='text/css'>
    <title>Louis Moore | Creating The Future  </title>
    </head>

   <style>
       .clearfix:after {
        content: ".";
        display: block;
        clear: both;
        visibility: hidden;
        line-height: 0;
        height: 0;
    }

    .clearfix {
        display: inline-block;
    }

    html[xmlns] .clearfix {
        display: block;
    }

    * html .clearfix {
        height: 1%;
    }

    .box {
    width:100%;
    }
    .images{
    background-color: #F1F2F2;
    border: 1.5px #D1D3D4 solid;
    height:450px;
    width:100%;
    }
    .image1 {
    margin:auto;
    display:block;


    }
    body{
    font-family: 'Paytone One', sans-serif;
    font-size: 30px;
    }
    h1 {
    font-family: 'Paytone One', sans-serif;
    font-size: 40px;
    text-align:center;
    padding-top:25px;
    color:#ddd;

    }
    h2 {
    font-family: 'Paytone One', sans-serif;
    font-size: 30px;
    text-align:center;
    color:red;
    }
    h3 {
    font-family: 'Paytone One', sans-serif;
    font-size: 20px;
    text-align:center;
    color:red;
    }
    .image2 {

    }
    .box1 {
    width: 100%;
    height: 5px;
    background-color:  #FC3B3B;

    }
    p {

    font-size: 15px;
    font-family: arial;
    color: #585858;
    }

   </style>
    <body>
    <div class="box clearfix">
    <div class="images">
    <img src="fashion2.jpg" class="image1" alt="." width="400px" height="400px">
    </div>
    <h1> WELCOME TO MY PAGE</h1> 
    <h2>COMING SOON... </h2>
    <h3>BUT FOR NOW FOLLOW ME ON TWITTER</h3>
    <a href="http://twitter.com/louismoore18"><img src="twitter.png" class="image2" border="0" alt="."></a>
    </div>
    <div class="box1 clearfix">

    </div>
    <div class="clearfix">
    <p>louismoore.net © All rights reserved 2012</p>
    </div>
    </body>
    </html>

    Use this HTML code,

    And use this css code and no need extra css for IE
于 2012-12-23T17:21:38.387 に答える