Jump to content

Recommended Posts

I am trying to make my active link be a different color (orange) But it's always defaulting to the navmenu li a definition. What can I do to change this behavior?

 

menu.css

#navmenu{
border: 1px solid black;
border-bottom-width: 0;
width: 175px;
}

#navmenu ul{
margin: 0;
padding: 0;
list-style-type: none;
font: normal 90% 'Trebuchet MS', 'Lucida Grande', Arial, sans-serif;
}

#navmenu li a{
display: block;
padding: 3px 0;
padding-left: 9px;
width: 159px; /*185px minus all left/right paddings and margins*/
text-decoration: none;
color: white;
background-color: #2175bc;
border-bottom: 1px solid #90bade;
border-left: 7px solid #1958b7;
}

a#activemenu{
background-color: #FFAA33;
border-left-color: #FF0000;
}

* html #navmenu li a{ /*IE only */
width: 187px; /*IE 5*/
width: 159px; /*185px minus all left/right paddings and margins*/
}

#navmenu li a:hover {
background-color: #2586d7;
border-left-color: #1c64d1;
}

#navmenu div.menutitle{
color: white;
border-bottom: 1px solid black;
padding: 1px 0;
padding-left: 5px;
background-color: black;
font: bold 90% 'Trebuchet MS', 'Lucida Grande', Arial, sans-serif;
}

 

index.php

<div id="navmenu">

<div class="menutitle">Navigation</div>
<ul>
<li id="activemenu"><a id="activemenu" href="index.php">Home</a></li>
<li><a href="location.php">Location</a></li>
<li><a href="prices.php">Prices</a></li>
<li><a href="contact.php">Equipment</a></li>
<li><a href="contact.php">What to Bring</a></li>
<li><a href="contact.php">Contact Us</a></li>
</ul>

<div class="menutitle">Links</div>
<ul>
<li><a href="linkgoeshere">Weather Forecast</a></li>
<li><a href="linkgoeshere">River Height</a></li>
</ul>

</div>

Link to comment
https://forums.phpfreaks.com/topic/207718-why-is-this-not-being-overwritten/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.