html - 宽度不适用于 IE 9 中的类容器

标签 html css

我正在尝试为 .container 类应用宽度,但即没有对 css 进行任何更改。如果有人有任何想法请告诉我。下面是我的代码。

<!-- [if ie 9]>
.nav > li > a{
padding-left: 20px !important;
}
 .container{
max-width: 1350px !important;
width: 1350px !important;
}
<![endif]-->

My website link

This is screen shot what i am getting

最佳答案

条件注释用于 html 标记,而不是 css。 (请参阅 here 了解用法)

有针对 ie9 的 css hack,例如 /9 或 ... 这个:

/* target Internet Explorer 9 and Internet Explorer 10:*/

    @media screen and (min-width:0\0) { 
        /* ie9+ code here */
        ...
    }

检查这个例子 FIDDLE 在IE9+及其他浏览器中

关于html - 宽度不适用于 IE 9 中的类容器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20517349/

相关文章:

html - 我有带有 bootstrap 的 html 模板,我怎样才能将它转换成电子邮件模板

javascript - 是否可以将 HTML 重定向到 javascript 函数?

html - 缩小屏幕时不显示文字

html - .css 页面切断页脚,不会滚动

javascript - Vimeo Javascript API 检索观看次数

javascript - 基于 xAxis 元素点击显示额外数据 - Highcharts.js

javascript - 设置动态值 css 动画 stroke-dashoffset

html - 在html或css中指定图像大小的区别

javascript - 消息显示只是将其悬停

javascript - Jquery:如何从 div 数组中获取共同的父 div(等高)