I have this set of primary links
================
<div id="primaryLinks">
<ul class="links">
<li class="menu-150 first"><a href="http://espn.com" title="espn link 1">espn 1</a></li>
<li class="menu-151"><a href="http://espn.com" title="espn link 2">espn 2</a></li>
<li class="menu-152"><a href="http://espn.com" title="espn link 3">espn 3</a></li>
<li class="menu-153"><a href="http://espn.com" title="espn link 4">espn 4</a></li>
<li class="menu-154 last"><a href="http://espn.com" title="espn link 5">espn 5</a></li>
</ul>
</div>
=================
If I want to reference a single link within a li ("espn link 2" for example), currently I can't do it. I can only reference the li list item and that's as close as I can get.
If I was somehow able to add an id tag to the <a> element that would be perfect. Is there a way to add/reference an id tag to <a> elements so that a <a> looks like this instead?
<li class="menu-151"><a href="http://espn.com" title="espn link 2" id="espnlink2id">espn 2</a></li>
Thanks!
Comments
why do you need the id in
why do you need the id in the link if you have the class of the li tag?
if you want the text-color of the second link to be red you can try:
I didn't wanna go too far off the subject but...
maybe this will give you some insight into what i'm ultimately trying to do.
Notice the "current" ID in the link.
http://css.maxdesign.com.au/listamatic/horizontal09.htm
Thanks.
Sorry, but I can't
Sorry, but I can't understand..
There is definetly a id="current" in the link in the html code, but it's not referenced in the css code: what do you need it for?
point taken. Thanks for
point taken. Thanks for clearing that up.
I guess there's no way in drupal to identify the link of the 'current' page is there?
Drupal should add the
Drupal should add the "active" class to the current page link by default, but I don't know if it depends on the theme you use.
Try it yourself: open a menu link of your primary link and have a look at the source code if you have the class="active" in it.