admin管理员组文章数量:1122826
I wish to style the active link (ie. when home page is selected that the home page link be a different colour)
.current-menu-item a { color: #36c; }
My test site is : www.milknhny.co.uk/ShopTest
I placed this in the CSS as i believe this was the class that i wished to change, however it does not appear to have worked.
Could i please ask where i have gone wrong on this?
thanks
I wish to style the active link (ie. when home page is selected that the home page link be a different colour)
.current-menu-item a { color: #36c; }
My test site is : www.milknhny.co.uk/ShopTest
I placed this in the CSS as i believe this was the class that i wished to change, however it does not appear to have worked.
Could i please ask where i have gone wrong on this?
thanks
Share Improve this question asked Jan 30, 2013 at 8:41 Kirsty MarksKirsty Marks 2571 gold badge3 silver badges13 bronze badges2 Answers
Reset to default 0You will have to set #menuwrap ul li.current-menu-item a
to the color and style you want.
The Problem is actually a CSS issue - because the CSS is more specific if an ID of an element is defined (like in your #menuwrap ul li a
), so the above definition is even more specific and is used instead of the current one.
This is your code for CSS:
#menuwrap ul li.current-menu-item a{ color: #36c; }
I would also suggest you to use Opera's Dragonfly, FireFoxe's Firebug or Chrome's Developer Tools to debug your CSS, JS and other things...
本文标签: menusStyling Active Links Within Wordpress
版权声明:本文标题:menus - Styling Active Links Within Wordpress 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736293636a1929187.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论