-1

我正在尝试更改此 wordpress 主题上的搜索框和社交网络链接的颜色。我之前做过很多网络开发,但这是我第一次使用 wordpress。样式 CSS 上的原始颜色是橙色。您可以在下面看到我已将其更改为绿色,但是更改并未生效。

主题是“餐厅”

这是网站: www.playlistforlife.org.uk/wordpress

/******************************************************************
SEARCH BOX
******************************************************************/

#search-box-wrap {
background-color: #8bb295;
height: 50px;
margin-left: -33px;
margin-right: -33px;
display: none;

}

#search-box {
position: relative;
width: 96%;
margin: 0 auto;
padding: 0 2%;
max-width: 1062px;
-webkit-box-sizing : border-box; 
-moz-box-sizing : border-box; 
-o-box-sizing : border-box; 
box-sizing : border-box;
}

#search-box #searchform {
float: right;
margin-top: 10px;
}

#search-box #searchform label {
display: none;
}

#s {
height: 30px;
font-size: 1.2em;
background: url(library/images/icon-search.png) no-repeat 7px 7px #fff;
padding: 5px 7px 5px 30px;
border: 0;
box-shadow: 3px 3px 10px #d0d0d0 inset;
min-width: 400px;
outline: none;
margin-right: -4px;
}
.post-content #s {
    min-width: 50%;
}

#searchform input[type=submit] {
height: 30px;
background-color: #8bb295;
font-family: "Droid Sans", Arial, Helvetica, sans-serif;
font-weight: 700;
font-size: 14px;
text-transform: uppercase;
color: #fff;
border: 0;
padding: 3px 10px;
}

#search-box #close-x {
float: right;
width: 23px;
height: 23px;
background-color: #8bb295;
font-family: "Droid Sans", Arial, Helvetica, sans-serif;
font-weight: 700;
font-size: 14px;
text-transform: uppercase;
color: #fff;
text-align: center;
line-height: 21px;
margin-top: 15px;
margin-right: 0;
margin-left: 20px;
cursor: pointer;
}

/******************************************************************
SOCIAL MEDIA BUTTONS STYLES
******************************************************************/

#social-media {
display: inline-block;
width: 39%;
text-align: right;
vertical-align: bottom;
padding-bottom: 20px;
}
#social-media a,
#search-icon {
    background-color: #8bb295;
    width: 30px;
    height: 29px;
    display: inline-block;
    border-radius: 50%;
    margin-left: 5px;
    margin-bottom: 8px;
    text-indent: 9999px;
    outline: none;
    background-repeat: no-repeat;
    background-position: center center;
    vertical-align: top;
    overflow: hidden;
}
4

3 回答 3

0

打开 header.php 文件。</head>在标记之前写css样式为

<style>
#search-box-wrap {
background-color: #8bb295;
}
#social-media a, #search-icon {
background-color: #8bb295;
}
</style>

它会起作用的。

于 2013-11-12T10:46:46.527 回答
0

您可以在 WP 主题中更改主题选项中的颜色。或将代码作为!important

#social-media a, #search-icon {
    background-color: #8BB295 !important;
    background-position: center center;
    background-repeat: no-repeat;
    border-radius: 50%;
    display: inline-block;
    height: 29px;
    margin-bottom: 8px;
    margin-left: 5px;
    outline: medium none;
    overflow: hidden;
    text-indent: 9999px;
    vertical-align: top;
    width: 30px;
}

#search-box-wrap {
    background-color: #8BB295 !important;
    display: block;
    height: 50px;
    margin-left: -33px;
    margin-right: -33px;
}
于 2013-11-12T10:25:28.540 回答
0

这是导致它的规则。

/wordpress/ #2 第 35 行

#search-box-wrap, #social-media a, #search-icon, .post-content a.more-link, .pagination a:hover, .pagination span.current, #comment-nav-above a, #comment-nav-below a, #nav-above a, #nav-below a, #image-navigation a, .commentlist .comment-reply-link, .commentlist .comment-reply-login, #respond #submit, .grid-box .menu-price {
  background-color: #E68B2B;
}
于 2013-11-12T10:14:13.080 回答