[thelist] A:Active Working Example?

Rob Smith rob.smith at THERMON.com
Mon Feb 24 14:13:01 CST 2003


>could you explain what you mean by "reset" visited links?

>if you want links not to have a separate colour for visited state,
>that's easy.

Yup, it is. I had the impression from your original posting that "you could
also try this"

a:visited:hover
a:visited:active
... etc.

I looked at it a bit and you're basically not solving the problem. You're
leaving a trail of clicked links using standard css attributes. Remember,
the active property is not the active page, but the current link clicked, in
the down click operation.

(while studying Emma's example:
http://careermatters.tvo.org/highschool/other.phtml)

The css is what impressed me and what I was going after. Allow me to
extrapolate the css and usage for the red link in the above example:

CSS:
----

UL.bigLinks LI.bigLinksSel A {
	PADDING-LEFT: 0px;
	LIST-STYLE-POSITION: outside;
	COLOR: #FF0000;
	LIST-STYLE-TYPE: disc;
	TEXT-DECORATION: none
}
LI A.whiteLinks {
	FONT-WEIGHT: bold;
	FONT-SIZE: 12px;
	COLOR: #fff;
	TEXT-ALIGN: left;
	TEXT-DECORATION: none! important
}

Usage:
------
<UL class=bigLinks>
        ...
	  <LI>
         <A class=whiteLinks
          href="http://careermatters.tvo.org/ _
          highschool/show_grade.phtml">Courses</A>
        <LI class=bigLinksSel>    <----------------------<<<
	   <A class=whiteLinks
          href="http://careermatters.tvo.org/ _
	    highschool/other.phtml">Other Ways to Earn Credits</A>
 	  <LI>
         <A class=whiteLinks
          href=...
</ul>

The arrow is what I was going after. Basically, *how* do you set the current
page's link to a different color. I do not disagree with the effectiveness
of the programming solutions out there. I just wanted a simple one, like the
one above. This approach however may not be the best one for frequently used
navigation systems. So, ;-) I supposed I could implement some sort of: check
URL for page title, if it matches link A, then use a different class.

Throwing my hands in the air and walking off the scene,

Rob.Smith




More information about the thelist mailing list