3 replies [Last post]
Damien
Offline
Regular
Adelaide, South Australia
Last seen: 17 years 21 weeks ago
Adelaide, South Australia
Joined: 2003-09-05
Posts: 16
Points: 0

If you take a look at this site [LINK], you will find a menu using the markup below near the beginning of the source:

... <a href="/allsrc">ALL SOURCE</a> | <span class="linksel"><a href="/elec">ELECTRONIX</a></span>
      | <a href="/kontact">KONTACT</a> ...

The problem is that the span element with the .linksel style wont work. The CSS below will not work on the .linksel a:hover event. I think it may be conflicting with the other a:hover style.

a:link, a:visited {
  color: #FC0;
}
a:hover {
  color: #FF9;
  text-decoration: none;
}
.linksel a:hover {
  color: #FF9;
  text-decoration: none;
}
a:active, .linksel, .linksel a:link, .linksel a:visited, .linksel a:active {
  color: #FFF;
  text-decoration: none;
}

Please help - thanx ! 8D

- Damo

Daybreak_0
Offline
Enthusiast
Sydney, Australia
Last seen: 17 years 10 weeks ago
Sydney, Australia
Timezone: GMT+10
Joined: 2003-11-15
Posts: 389
Points: 0

Why wont a:hover work in this instance?

Try putting in correct order

put this at bottom not in middle

.linksel a:hover {
color: #FF9;
text-decoration: none;
}
should be below the normal .linsel a:link

Regards
Day

The only way to learn is to do it yourself

Damien
Offline
Regular
Adelaide, South Australia
Last seen: 17 years 21 weeks ago
Adelaide, South Australia
Joined: 2003-09-05
Posts: 16
Points: 0

Why wont a:hover work in this instance?

I don't see why they would need to be in any particular order, but HEY, it worked!!! I think that is rather peculiar, as it resulted in a larger stylesheet.

I think CSS lacks flexibility in the area and I'm surpised that MSIE doesn't override this as Microsoft does alot of things on it's own. Not surpised with Opera though, that is almost compliant with everything about CSS, even it's faults.

Thanks alot, Daybreak.

Daybreak_0
Offline
Enthusiast
Sydney, Australia
Last seen: 17 years 10 weeks ago
Sydney, Australia
Timezone: GMT+10
Joined: 2003-11-15
Posts: 389
Points: 0

Why wont a:hover work in this instance?

Normally the order is
link
visited
hover
active

But if active is the same as link or visited I have never seen it make any difference. I usually have it in the above order, as I do use different attributes, or make it the same as Hover.

Active is important for people that use Tab to traverse your site.

Day

The only way to learn is to do it yourself