如何使网页内容的宽度达到 100%?
How do I make the width of content on my web pages 100%?
如何让所有静态页面在所有静态页面中显示全宽?例如,在我所有的静态页面中,我的内容只占所有静态页面的一半。
具有 url 结构的页面 /p/sample.html 是唯一受影响的页面。这些是联系我们、关于我们、政策等静态页面。
/2017/10/samplepage.html 不受影响。这些是常规博客文章。
我的网站实际托管在 google.com
我尝试过的:
我试过这个:
<b:if cond="data:blog.pageType == "static_page"">
.sidebar {display:none;}
#main-content{width: 100%; float: none; margin: 0 auto;}
.main-content .column-center-inner {width: 900px;margin-left: 0px;}
.blog-posts-wrapper {
float: left;
width: 100%;
margin-right: 1.5%;
<b:if cond="data:blog.isMobile == "false"">
.main-content .column-center-inner {width: 100%;}
但是没有用,我不知道为什么。请您提供任何意见。
body {
margin:0;
}
添加保证金或者你实际上可以给 display:block;体内
您需要从页面.post-outer
中删除width:300px
试试这个
<b:if cond='data:view.isPage'>
<style>
.post-outer {
width: 100%;
padding: 15px;
box-sizing: border-box;
}
</style>
</b:if>
如何让所有静态页面在所有静态页面中显示全宽?例如,在我所有的静态页面中,我的内容只占所有静态页面的一半。
具有 url 结构的页面 /p/sample.html 是唯一受影响的页面。这些是联系我们、关于我们、政策等静态页面。
/2017/10/samplepage.html 不受影响。这些是常规博客文章。
我的网站实际托管在 google.com
我尝试过的:
我试过这个:
<b:if cond="data:blog.pageType == "static_page"">
.sidebar {display:none;}
#main-content{width: 100%; float: none; margin: 0 auto;}
.main-content .column-center-inner {width: 900px;margin-left: 0px;}
.blog-posts-wrapper {
float: left;
width: 100%;
margin-right: 1.5%;
<b:if cond="data:blog.isMobile == "false"">
.main-content .column-center-inner {width: 100%;}
但是没有用,我不知道为什么。请您提供任何意见。
body {
margin:0;
}
添加保证金或者你实际上可以给 display:block;体内
您需要从页面.post-outer
中删除width:300px
试试这个
<b:if cond='data:view.isPage'>
<style>
.post-outer {
width: 100%;
padding: 15px;
box-sizing: border-box;
}
</style>
</b:if>