T
tshad
I am trying understand the order of link styles. This caused me a bit of
problems when I changed my links just lately.
I have 4 files to show what is happening.
In the first file, http://www.payrollworkshop.com/samples/testLink1.htm, I
have no classes and all the links use the Browser defaults.
In the 2nd file, http://www.payrollworkshop.com/samples/testLink2.htm,I
added a class that sets the color to red and have set one of the links to
that class. It shows red no matter whether active, visited or link. This
is exactly what I was looking for. I wanted to set some links to be one
color, but not change color when it first visits a page, as normally happens
with links.
I that that was fine until I started adding in other styles using the "a:"
styles. By adding the styles, as shown in
http://www.payrollworkshop.com/samples/testLink3.htm, and doing nothing else
all the links, including the ones with the class definition on it - they all
changed to the new colors.
This is confusing. If the class overrode the default link behavior, why
wouldn't it also override the new link behavior. I would have thought that
the new link behavior would act the same way and affect only those that
didn't have a specific class assigned to it.
Then, in http://www.payrollworkshop.com/samples/testLink4.htm, I took out
all the specific links (a:link, a:visited and a:active). Then the old class
(.toplink - which is not a link behavior) - worked over the "a" behavior.
Why didn't the 1st link use the "a" definition instead of the .toplink
behavior.
Very confusing.
Thanks,
Tom
problems when I changed my links just lately.
I have 4 files to show what is happening.
In the first file, http://www.payrollworkshop.com/samples/testLink1.htm, I
have no classes and all the links use the Browser defaults.
In the 2nd file, http://www.payrollworkshop.com/samples/testLink2.htm,I
added a class that sets the color to red and have set one of the links to
that class. It shows red no matter whether active, visited or link. This
is exactly what I was looking for. I wanted to set some links to be one
color, but not change color when it first visits a page, as normally happens
with links.
I that that was fine until I started adding in other styles using the "a:"
styles. By adding the styles, as shown in
http://www.payrollworkshop.com/samples/testLink3.htm, and doing nothing else
all the links, including the ones with the class definition on it - they all
changed to the new colors.
This is confusing. If the class overrode the default link behavior, why
wouldn't it also override the new link behavior. I would have thought that
the new link behavior would act the same way and affect only those that
didn't have a specific class assigned to it.
Then, in http://www.payrollworkshop.com/samples/testLink4.htm, I took out
all the specific links (a:link, a:visited and a:active). Then the old class
(.toplink - which is not a link behavior) - worked over the "a" behavior.
Why didn't the 1st link use the "a" definition instead of the .toplink
behavior.
Very confusing.
Thanks,
Tom