CSS活动菜单项

时间:2013-04-03 18:33:32

标签: css joomla menu

您好我正在尝试修改活动菜单项没有不同颜色的网页模板。我已经尝试了各种变化来调整它。有任何想法吗?这是css:

/** TOP MENU        **/

.top_menu .moduletable {
margin:0;
}

.top_menu li {
margin:0px 0 0 5px ;
padding:0;
float:left;
height:100px;
list-style : none;
background : transparent url(../images/top_menu_left.png) 0 0 no-repeat;
opacity:0.6;
-ms-filter: "prodig:DXImageTransform.Microsoft.Alpha(Opacity=60)"; /* fix IE8   */
filter: apha(opacity = 60);                    /* fix IE7       */
-webkit-transition : all 0.4s ease-in-out;
-moz-transition : all 0.4s ease-in-out;
-ms-transition : all 0.4s ease-in-out;
-o-transition : all 0.4s ease-in-out;
transition : all 0.4s ease-in-out;
}

.top_menu li:hover {
opacity:1;
-ms-filter: "prodig:DXImageTransform.Microsoft.Alpha(Opacity=100)"; /* fix IE8  */
filter: apha(opacity = 100);                                               /* fix IE7       */
}

.top_menu li a {
display:block;
color: #24221E/*8c8c8c*/;
text-shadow:0 0 3px #fff;
background : transparent url(../images/top_menu_right.png) 100% 0 no-repeat;
text-decoration:none;
text-transform: none;
font-weight:bold;
font-size:90%;
margin-right:-13px;
padding: 60px 22px 4px 20px;
height:40px;
}

非常感谢任何帮助

1 个答案:

答案 0 :(得分:1)

我发现您使用Joomla作为内容管理系统,您必须使用类来设置项目的样式,例如active,然后您可以使用CSS为此项目指定不同的样式。

.active {
    text-decoration: underline;
    font-weight: bold;
}

如果您想更改链接的颜色,则需要使用以下代码直接添加标签。

.active a {
   color: red;
}

您可能会发现此答案也很有用:Joomla - how to hightlight the menu item for active page