使用CSS定位特定小部件标题 [英] Targeting a specific widget title with CSS
问题描述
在我的wordpress动力网站上我有小部件标题框,如果你看看,你会看到我有一个标题为英国狮子在网站的右手边的左侧栏。
这是一个类别小部件,将只显示该类别的帖子。我想将标题框从绿色更改为红色,以匹配英国狮子的风格。
然后我会添加更多的这些小部件,但他们会从不同的类别,也会有自己的颜色风格。你会看到我的意思是在首页的主要内容aviva是黄色的超级橄榄球是蓝色等等,但我想要的小部件aswell。
我如何使用css目标特定的窗口小部件框更改背景。我尝试了firebug,但它似乎改变所有的小部件标题框,而不是那个具体的一个我后。
希望有人能帮助我,我有意义。 p>
感谢
让我们以英国狮子会选项卡为例。
#feacpost_featuredcategorypostswidget-2 h3 {
background-color:#ff0000!important;
}
把这个css放到你自己的样式表中。
我希望这有助于。
On my wordpress powered website I have widget title boxes if you have a look you will see I have a one titled 'british lions' in the left sidebar on the right hand side of the website.
This is a category widget and will only show posts from that category. I would like to change the title box from green to red to match the 'british lions' style.
I will then add more of these widgets but they will be pulling from different categories and will also have their own color style. You will see what i mean on the main content on the front page aviva is yellow super rugby is blue etc etc but i want this for the widgets aswell.
How do i target the specific widget boxes with css to change the background. I have tried with firebug but it seems to change all the widget title boxes and not that specific one i am after.
Hopefully someone can help and i am making sense.
Thanks
It is possible. Let us take the 'British Lions' tab here for instance.
#feacpost_featuredcategorypostswidget-2 h3 {
background-color: #ff0000 !important;
}
Take this css and put it inside your own stylesheet.
I hope this helps.
这篇关于使用CSS定位特定小部件标题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!