【问题标题】:personalize a password protected page on Salient (Wordpress theme)个性化 Salient 上的密码保护页面(Wordpress 主题)
【发布时间】:2018-07-29 16:28:05
【问题描述】:

我正在尝试个性化我的投资组合主页,该主页受密码保护,并已在 Wordpress 中以显着主题 (http://federicaaradelli.com/) 构建。

我只设法为密码表单添加了一些边距和填充,但我无法更改页面背景颜色或添加背景图像。

这是我在个性化 CSS 中写的:

.post-password-form {
margin-top: 20%;
}

.post-password-form {
padding:10px;
background-color: white;
}

我也尝试检查页面/元素,但它并没有真正让我到任何地方。

有人知道如何解决这个问题吗?

谢谢! 费德里卡

【问题讨论】:

  • 您应该同时发布 html 和 css 以获得帮助。一般应该是body { background-color: yellow; }
  • 代码太长,无法复制/粘贴,但您可以检查它检查页面。该部分以<div class="container-wrap" style="opacity: 1; margin-bottom: 211px; min-height: 378px;"> 开头

标签: css wordpress forms wordpress-theming background-image


【解决方案1】:

将此添加到您的 CSS:

.container-wrap {
    background-color: yellow !important; /* Generally, you don't need 
                                            to use "!important" in
                                            your CSS, but currently
                                            there is some overwriting
                                            in your code and I use
                                            "!important" as a quick
                                            fix.
                                         */
    background-image: url(https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png);
    /* Optionally: */
    background-repeat: no-repeat;
    background-size: 100%; /* Sometimes it would be better to
                              use "cover" instead of "100%",
                              but in your case "100%" is the
                              best option.
                           */                                    
}

【讨论】:

  • 完成! .container-wrap 将网站上所有页面的背景更改为我不得不将其删除!
猜你喜欢
  • 1970-01-01
  • 2021-06-10
  • 2011-06-21
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2021-06-19
  • 1970-01-01
  • 2023-03-04
相关资源
最近更新 更多