html - 对齐在 IE10 中损坏

标签 html css

我有 CSS 代码,带有页眉和页脚。当我打开 IE10 时,左侧栏中的注销对注销有好处,但是当我在 IE9、8、7、6 中打开它时,当我修复 IE9、8 中的注销对齐时,注销对齐出现在页面中央,7,6 它在 IE10 中损坏。 如何解决此问题,以便在 IE10 和 IE9、8、7、6 中注销都保留在其左侧栏位置

你可以在http://jsfiddle.net/hadinetcat/E8jd3/5/看到我的网站

CSS

.container3 {
float:left;
width:100%;
/*background:green;*/
overflow:hidden;
position:relative;
}

.container2 {
float:left;
width:100%;
background:FFA500;
position:relative;
right:45%;
}

.container1 {
float:left;
width:100%;
/*background:red;*/
position:relative;
right:40%;
}

.col1 {
float:left;
width:26%;
position:relative;
left:87%;
overflow:hidden;
height:570px;
}

.col2 {
float:left;
width:50%;
position:relative;
left:90%;
overflow:hidden;
}

.col3 {
float:left;
width:26%;
position:relative;
left:80%;
overflow:hidden;
}


.footer {
        border:1px solid orange;
        position: relative;
        padding:0px;
        margin-top:-5px;
    font-size:15px;
    bottom:36px;

    }


.signout {
 position:       relative;
 width:          200;
 bottom:         150px;
 left:           20px;
 }

html

<div id="header" style="background-color:#FFA500;">

<h1 style="margin-bottom:0;">Wellcome To Balhalfe Services Customer Reports</h1>

<div class="container3 ">
<div class="container1 ">
<div class="container2 ">


<div class="col1">

lalalallalalalallala <br />
lllllllllllllllllllll <br />

</div>


<div class="col2">

<div align="center">
        <H2 align="center"> Report Table</H></div> 

<table border="1" align="center"> 
        <tr>
                <td><b>Name</b></td>
                <td><b>Mime</b></td>
                <td><b>Size (bytes)</b></td>
                <td><b>Created</b></td>
                <td><b>Download</b></td>
            </tr>




            <tr>
                <td>1594(HA 10 AL HAALY).pdf</td>
                <td>application/pdf</td>
                <td>60964</td>
                <td>2013-08-29 23:40:07</td>
                <td><a style='text-decoration:none;'href=' get_file_work.php?id=6&company=companya'>Download</a></td>
            </tr>

<tr>
                <td>eu contres.txt</td>
                <td>text/plain</td>
                <td>546</td>
                <td>2013-08-22 00:06:55</td>
                <td><a style='text-decoration:none;'href=' get_file_work.php?id=4&company=companya'>Download</a></td>
            </tr></table>

</div>


<div class="col3">

</div>

</div>

</div>


<div class="signout">

<a  style='text-decoration:none;' href= "index.html">Sign Out </br></a>

</div>


<div class="footer" style="background-color:#FFA500;clear:both;text-align:center;">
Copyright © balhalfe services 20103-2014</div>

</div>

最佳答案

.signout 应该是 position:absolute; clear:left; 不是 position:relative;position:absolute;relative 最后一个父 position:relative;

以下信息在未来仍然有用:

由于 IE 10 不接受 IE 特定的 HTML 来控制 CSS。我使用以下代码:

var doc = document, bod = doc.body, IE = parseFloat(navigator.appVersion.split('MSIE')[1]);
function gteIE(version, className){
  if(IE >= version){
    bod.className = className;
  }
}
gteIE(10, 'ie10');

现在,只需确保在 CSS 中指定 .ie10

关于html - 对齐在 IE10 中损坏,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19169636/

相关文章:

css - react native 文本不对齐

javascript - 为什么我的菜单没有下拉菜单?

jquery - 按钮上的工具提示 Jquery

javascript - html 文本框中只输入一位小数

html - 为什么 'right' 属性不适用于我在 IE 中的代码?

javascript - 如何使用 jquery marcopolo 实现自动完成

html - 调整窗口大小后将框保持在正确位置

javascript - 如何放大 jQuery?

javascript - 你如何将 HTML 插入到 QuillJS 中?

javascript - 即使触发了许多动画,也显示动画完成一次