[thelist] A:Active Working Example?

.jeff jeff at members.evolt.org
Mon Feb 24 17:26:01 CST 2003


rob,

><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
> From: Rob Smith
>
> a) what are your 'normal' link colours?
> a:link {
> 	color="#000000"
> }
> a:hover {
> 	color="#B95F4C"
> }
> a:active {
> 	color="#B95F4C"
> }
> a:visited {
>  	color="0000000"
> }
> a.selected {
> 	color="#B95F4C"
> }
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><

you pseudo-classes are in the wrong order.  they should be l, v, h, a.

a:link {
	color="#000000"
}
a:visited {
 	color="0000000"
}
a:hover {
	color="#B95F4C"
}
a:active {
	color="#B95F4C"
}

second, you shouldn't be using = to assign values to the color property.
you should be using :.  third, property values rarely need to be wrapped in
quotes.  this is definitely one of those cases where it's not necessary.
fourth, each property value should end in a semi-colon.  fifth, all color
values should be preceded by an octothorpe (#).

a:link {
	color: #000000;
}
a:visited {
 	color: #000000;
}
a:hover {
	color: #B95F4C;
}
a:active {
	color: #B95F4C;
}

><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
> it is a shortened version. the onClick had a few more
> directives with the same attitude of the one listed,
> but nested inside a frameset.
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><

why the scripting on the link?  it's totally unnecessary.  using an
octothorpe as the href attribute value will cause other oddities in both
browser link behavior and css usage.  fwiw, any link that's an in-document
anchor will automatically be marked as if it's a visited link in many
browsers.

also, does the document in the frameset you're referring to also source in
this same external stylesheet or are you expecting it will cascade from the
top-level document into the documents within the frameset (fyi, it won't)?

><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
> becuase e) is not responded to, to what you've said
> here, and what I agreed with my manager is that once
> you're at that page, there is no need for that
> highlighted link to be active any longer so - It now
> resides as a dead link.
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><

you and your manager have both arrived at an incorrect conclusion.  there
are lots of good reasons for the link to remain active.  far better to leave
it active than to partially castrate it with the scripting.

Links & JavaScript Living Together in Harmony
http://evolt.org/article/thelist/17/20938/

a url to what you're working on would help greatly in trying to come up with
suggestions for alternative solutions.

good luck,

.jeff

http://evolt.org/
jeff at members.evolt.org
http://members.evolt.org/jeff/




More information about the thelist mailing list