在Salient(WordPress主题)上个性化受密码保护的页面

时间:2018-07-29 16:28:05

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

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

我仅设法在密码表单中添加了一些边距和填充,但是我无法更改页面背景颜色或添加背景图片。

这就是我在个性化CSS中编写的内容:

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

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

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

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

谢谢! 费德里卡

1 个答案:

答案 0 :(得分:0)

将此添加到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.
                           */                                    
}