【发布时间】:2017-09-27 07:56:36
【问题描述】:
我必须在一个名为 kwik (KwikCMS) 的 CMS 中建立一个网站。
现在我已经制作了整个网站,但我必须为多个显示器添加几个媒体屏幕。我已经在 F12 检查器中测试了所有这些代码,它应该都可以修复它,但由于某种原因,它不需要我的 CSS。
我已经尝试过使用和不使用 !important,但我不知道如何解决这个问题。
这是我的 CSS 代码:
@media screen and (max-width: 1440px){
.site-scope .header-container .site-header .headerBlauw {
margin-left: -14.2% !important;
width: 102.5% !important;
}
.col-sm-12.module-wrapper.cms-preset-dropdown-shown{
height: 202px;
}
.row.site-header.header-slider {
padding: 0;
margin-left: -22px;
width: 1454px;
}
.site-scope .col-sm-12.module-datacontainer.module-align-left.module-container {
padding: 0 !important;
}
.site-scope .header-container .site-header .headerBlauw {
margin-left: -14.4% !important;
width: 96.6% !important;
}
.site-scope .header-container .site-header .module-menu {
margin-left: -24% !important;
}
.site-scope .col-sm-12.module-datacontainer.module-align-left.module-container {
padding: 0 !important;
margin-top: -23px !important;
}
.row.monteurs.row-container.sortable {
margin-left: -76px !important;
}
.row.blokken.row-container.sortable {
margin-left: -190px !important;
left: 69px !important;
text-align: center !important;
}
}
【问题讨论】:
-
好吧,我会做一个非常疯狂的猜测。您正在使用最大宽度。如果屏幕为 1440 像素及以下,它将更改类的 css。但如果您希望它显示在 1440 像素以上,请使用最小宽度。我认为这里就是这种情况。。
-
在 CSS Validator 中复制粘贴代码后,我在第 33 行得到了一个未知符号(也在 Sublime 中看到):.site-scope .col-sm-12.module-datacontainer.module -align-left.module-container { padding: 0 !important;边距顶部:-23px !重要; }
-
@AntonZlatkov 未知符号??在哪里?
-
@ShadowFiend 也不起作用,我也试过没有最大值或最小值,只是宽度:1440px,也不起作用
-
@JornBarkhof - "padding: 0 !important;" 在 ".site-scope .col-sm-12.module-datacontainer.module-align-left.module-container" 选择器中。当我在 Sublime 中打开未知符号时,它看起来像 [?]。我在“重要”之后看到它; - 你会发现一些空白,其中一个不是空的,而是那个符号......希望这会有所帮助
标签: css content-management-system screen media