CSS dashed border always appears white in IE8, why?

点点圈 提交于 2020-01-06 20:00:53

问题


Here is the deal, I have following div with dashed borders:

.dashed-header {
    /*background-color: transparent;*/
    height: 87px;
    margin-top: 5px;
    border-top: 1px dashed #613e27;
    border-bottom: 1px dashed #613e27;
}

for some reason border is white instead of #613e27 and I have no idea why it is so? Here is my webpage You can see this border in dark brown header line.


回答1:


Try using:

border-color: #613e27 !important;



回答2:


I have IE8 and it work fine, I put it inside another div to see if the color disappear or not, but the color still exist

<style>
.main {
    height: 200px;
    width:200px;
    margin-top: 5px;
    border: 1px solid black;
    background-color:#A1Ae27;
    padding: 15px;
}
.dashed-header {
    /*background-color: transparent;*/
    height: 87px;
    width:100px;
    margin-top: 5px;
    border-top: 1px dashed #613e27;
    border-bottom: 1px dashed #613e27;
}
</style>
<body>

<div class="main">
    <div class="dashed-header">
    </div>
</div>
</body>

try to change to solid border and see does they appear whit too in your EI8?



来源:https://stackoverflow.com/questions/11992718/css-dashed-border-always-appears-white-in-ie8-why

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!