Forum Moderators: not2easy

Message Too Old, No Replies

Null Link (a href) to different class

Works in N, O, and FF, not in IE

         

neophyte

12:02 am on Jun 7, 2006 (gmt 0)

10+ Year Member



Hi All.

I've got a navigation bar which I want to change the link color of the landing page. a:link is red; a:hover is yellow. landing color (class .active) is blue. Here's the trick, I want to keep the href on the landing link, but just alter it from a real url to a <a href="#">some link</a>

so, for the landing link style, I've got the property shows:

a.active {
color: #3333FF;
}

and the html is:

<li><a href="#" class="active">some link</a></li>

Works in everything but IE. Anyone know what I'm doing wrong... or if there's an IE-specific work around or syntax I should be using?

Neophyte

Setek

1:31 am on Jun 7, 2006 (gmt 0)

10+ Year Member



Is there a higher specificity on the original code that defines the
a
selectors and pseudo-selectors?

And where is the code placed? Is there something with equal specificity to

a.active
, but it is placed sequentially below it?

neophyte

2:39 am on Jun 7, 2006 (gmt 0)

10+ Year Member



Setek -

That was it: lack of specificity. Thanks for the slap in the back of the head!

Added ".nav" (class of the containing div) and all is now well with IE.

Appreciate your help.

Neophyte