html - 如何使网页内容的宽度达到 100%?

标签 html css styles blogger

如何让所有静态页面在所有静态页面中显示全宽?例如,在我所有的静态页面中,我的内容只占所有静态页面的一半。

具有 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;体内

关于html - 如何使网页内容的宽度达到 100%?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58546058/

相关文章:

javascript - 可以在没有 API 的情况下在 iframe 中打开 instagram

html - 在 'a href' 标签链接中调整图像大小

css - 防止在 HTML5 中滚动

javascript - 使用 JavaScript 生成定义数量的 div

javascript - 单击img区域时更改<p>内容

css - 如何使数字和字母底部均匀

html - 如何保存渲染的字体?

WPF窗口样式在运行时不起作用

android - 不同的主题可以有不同的color.xml吗?

css - Ext JS 中的样式组合框字段