gpt4 book ai didi

html - 你如何覆盖 html { min-width : 1200px } on wordpress?

转载 作者:太空宇宙 更新时间:2023-11-04 14:03:18 24 4
gpt4 key购买 nike

我一直在尝试将我的 wordpress 主题更改为 860 像素宽而不是 1200 像素。我已经将所有内容和页眉/页脚设置为 860 像素,看起来都很棒。即使是 <html>当我在 Firebug 中查看时,标签说它是 860px。

但是,我的<head>里面还有CSS代码我不知道它来自哪里的标签,它放在 html { min-width: 1200px; } 中.这导致我的网站在移动设备上加载为 1200 像素宽,内容仅为 860 像素宽。所以我所有内容的右边都有空白。我只想要它 860px,而不是居中或其他任何东西。任何建议都会有所帮助,谢谢大家!

最佳答案

如果您没有成功找到它的来源,您可以在您的 css 中添加此样式以覆盖 min-width属性:-

html { min-width: 860px !important; }

Jquery 方法:-将此代码粘贴到页面末尾,就在关闭之前 </body>标签:-

<script>
$(function(){
$("html").css("min-width", "");
});
</script>

关于html - 你如何覆盖 html { min-width : 1200px } on wordpress?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21325134/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com