Joomla - how to hightlight the menu item for active page

此生再无相见时 提交于 2019-12-13 13:15:03

问题


How do you highlight the menu item of the active page?

Thanks! Steph


回答1:


Please use following Css to Highlight selected/ active/ Current menu item

.menu ul ul{padding-left:10px;}
.menu ul li.active a{font-weight:bold;}
.menu ul li.active ul a{font-weight:normal;}
.menu ul li.active ul li.active a{font-weight:bold;}

This will work 100%.




回答2:


AFAIK the active menu position should have a special css class assigned to it. The class is probably called "active". You can target this class with some css rules and you should be done.




回答3:


That's very easy i just found it. That you have to do overrode for css such as a:link, a:hover, a:visited are using white colour but you need grey colour instead for active page you just make anything the same and put !important behind that in #active_menu as example :

#main a:link, #main a:hover, #main a:visited {colour:#FFF;}

#active_menu {#CCC !important;}



回答4:


Please Try this Css

#menu ul li.active a{background-color:#eee;color:#333;
                     border-bottom:1px solid #eee;}


来源:https://stackoverflow.com/questions/3366417/joomla-how-to-hightlight-the-menu-item-for-active-page

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!