Jump to content

Menu Items Highlighted When Selected


BigTuna

Recommended Posts

Hello, I would like to highlight active menu items, but I cant get it to work. Please have a look at part of the css I am using and tell me how should I customize it (the css file is from joomla template)..navbar { background:url(../images/navbg.jpg) repeat-x; height:44px; }.nav { margin: 0px; padding-left:30px; padding-top:10px; }.nav ul { list-style:none; margin: 0px; padding: 0px; }.nav li { margin: 0px; padding: 0px; display: inline; float:left; background:none !important; position:relative; top: -10px !important; }.nav a, .nav a:visited { display:block; color:#ffffff; text-decoration:none; padding-right:25px; padding-left:25px; padding-bottom:18px; padding-top:10px; z-index:1; } .navbar a:hover { color:#ffffff; background:url(../images/hover.jpg) repeat-x; text-align:center; padding-right:25px; padding-left:25px; padding-bottom:18px; padding-top:10px; }

Link to comment
Share on other sites

Be more specific about this: "highlight active menu items"when you say active, do you literally mean while the mouse is being clicked? If so, you'll need a definition for .nav a:active {}What does highlight mean to you in this context? Usually, it refers to a change in background color. But in this case, when the mouse hovers over a menu item, a background image is applied. A change in color won't be visible unless you also remove the image. Somehow I doubt that's what you want. You could replace the image during the click. That's a common technique. Or you could simply change the color property (which changes the color of the text).

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...