Wordpress子主题样式被父主题样式覆盖

Wordpress子主题样式被父主题样式覆盖,wordpress,themes,wordpress-theming,customization,Wordpress,Themes,Wordpress Theming,Customization,我正在尝试为主题设计书开发一个子主题,为此我创建了一个名为“mychild”的文件夹,并将style.css像themes/mychild/style.css一样放在其中 /* Theme Name: proudeon Theme URI: http: //www.presscoders.com/designfolio Description: Child theme for the Designfolio theme Author: sunilkumar

我正在尝试为主题设计书开发一个子主题,为此我创建了一个名为“mychild”的文件夹,并将style.css像themes/mychild/style.css一样放在其中

/*
Theme Name:     proudeon
Theme URI:      http: //www.presscoders.com/designfolio
Description:    Child theme for the Designfolio theme
Author:         sunilkumar
Author URI:     http: //www.presscoders.com/
Template:       designfolio
Version:        0.1.0
*/

@import url("../designfolio/style.css");
#header {
height: 450px;
border:1px solid red;
}
#header-container, .footer-widget-container{
background: none repeat scroll 0 0 red;     
}
但是这些变化并没有反映出来。我已经成功安装了子主题,我可以从wordpress编辑器编辑我的子主题style.css

我可以从firebug inspect元素中看到新的子样式,但它不是活动的。当我从firebug inspect元素中隐藏父样式时,我可以看到站点中反映的新样式

请帮我找出问题所在

谢谢
骄傲

尝试添加!在每个样式行中都很重要

例如:

#header {
height: 450px !important;
border:1px solid red !important;
}

添加
!重要信息
样式规则只能作为最后手段。您应该仔细阅读CSS Specificity(),因为这是处理样式规则优先级的更好方法。