My thoughts below ... untested.
So make a safe copy of what you have before modifying it.
Let's take a look at this line:
PHP Code:
<a href="home.html"><li class="active">Home</li></a>
And here is your CSS:
Code:
#Menu .active {
padding-left: 40px;
background: url(../images/m1.gif) no-repeat;
}
So you're giving it a background image and then you are padding it.
That means you are padding the whole thing <li>, including the background image.
How about this? ...
PHP Code:
// see how the <li> has it's class for the graphic ... but the <a href> does not ...
// also notice that the <a href> is nested inside the <li>, not the other way around.
<li class="active"><a href="home.html">Home</a></li>
<li class="non-active"><a href="news.html">Latest News</a></li>
And here is the CSS:
Code:
/* no padding here */
#Menu .active {
background: url(../images/m1.gif) no-repeat;
}
/* the padding is in the links themselves */
#Menu a:link,a:active,a:visited,a:hover {
background-color: transparent;
padding-left:40px;
}
EDIT:
This might also work ... adding spaces before the link text.
<li class="active"><a href="home.html"> Home</a></li>
But is not my preference for spacing content.
ANOTHER EDIT:
I didn't think of this before now, but if a link is "active", it won't be an <a href>.
Example, you're on your home page, the word HOME will have the little graphic
on the left, but it won't be a link because you're already on that active page.
So, you may have to add a class for menu items that are NOT links.
You can do that by putting the 'Home' into a span, with a class defined.
<li class="active"><span class="selected">Home</span></li>
<li class="non-active"><a href="news.html">Latest News</a></li>
/* also pad non-links */
#Menu .selected {
background-color: transparent;
padding-left:40px;
}
By still using the CSS style for #Menu a (link hover, etc), you now have
the ability to add a mouseover feature for each link. Example:
Separate the hover event and change the text color when the mouse moves over the link.
Code:
/* no padding here */
#Menu .active {
background: url(../images/m1.gif) no-repeat;
}
/* the padding is in the links themselves */
#Menu a:link,a:active,a:visited {
background-color: transparent;
padding-left:40px;
}
#Menu a:hover {
background-color: transparent;
padding-left:40px;
color:#a00;
}
.