Background for static page within dynamic theme

时间:2018-03-23 00:48:44

标签: html css blogger blogger-dynamic-views

Some improvements...

Using some modified CSS:

.article-content,.entry-content {
    background-color:#8a0202;
}

I was able to some of the background of the static landing page (http://www.sailingdee.com/p/welcometodee.html)

However, the background is not covering all the page (some white areas still persist).

And, the CSS applied the #8a0202 color to all the blog and i only want it to the static page...

Questions: 1- How to expand the #8a0202 to the totality of the landing page? 2- How to apply the CSS only to that specific page?

1 个答案:

答案 0 :(得分:1)

要确保CSS仅应用于此特定页面,您必须将这些样式包装在Blogger条件语句中。由于条件语句仅适用于模板编辑器,因此必须在<head>标记

之后的任何位置插入主题编辑HTML插入内容中的代码段。
<b:if cond='data:view.isPage &amp;&amp; data:view.pageId == 3526403800591689129'>
  <style>
    body{
      background-color:#8a0202;
    }
    .article-content,.entry-content {
      background-color:#8a0202;
    }
    .viewitem-panel div.viewitem-content, .viewitem-panel .article.hentry {
      background: #8a0202;
      border-image: none;
    }
  </style>
</b:if>

号码3526403800591689129是Blogger分配给页面http://www.sailingdee.com/p/welcometodee.html的唯一ID,可通过Blogger信息中心编辑此页面时在网址栏中找到

进行上述更改后,该页面将如下图所示 page full background