[thelist] javascipt and css hover

James Aylard evolt at pixelwright.com
Mon May 13 15:51:01 CDT 2002


> using the pseudo class hover attribute. What I need is to have the link TO
> and ON one.html be a different style(identifying location) until two.html
> clicked and you are on two.html, where the link TO two.html will have a
> different style signifying that you are on two.html. and the link to
> one.html will be in it's visited state as per the norm. images are not an
> option in this case.

    How about not making the link text for the current page into a link at
all? Instead, simply make it plain text -- styling it bold or coloring it in
some way if you choose, so long as it won't be confused with other actual
links on the page. There is no value in making a hyperlink that simply
returns the user right back to the current page [1].
    Create a class for this section of text and apply styling to it, e.g.:


<style type="text/css">
  .NoLink {
    font-weight: bold ;
    color: #000000 ;
  a:link {
    font-weight: bold ;
    color: #996699 ;
  a: hover {
    font-weight: bold ;
    color: #ffff00 ;


<span class="NoLink">Page 1</span><br>
<a href="Page2.html">Page 2</a>

1. If you're interested: http://www.useit.com/alertbox/9609.html

James Aylard

More information about the thelist mailing list