T
tshad
This is a continuation of a previous post where we talked about precedence
of link styles.
I understand how they work. I am just trying to find if they are legal or
are they going to cause me trouble with older browsers.
Some of my pages were done by someone else who set up their styles to work
like so:
This would turn the links white if they had the links set to something like:
<a href="#" class="toplink>test</a>
..toplink{
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10px;
color: #FFFFFF;
text-decoration: none;
font-weight:bold;
}
This was fine. But I wanted to set up my default links to be teal in color,
so I did the following:
a:visited {
color:#3EA2BC;
text-decoration: none;
}
a:link {
color:#3EA2BC;
text-decoration: none;
}
a:active {
color:#3EA2BC;
text-decoration: none;
}
This works fine for all my links, but it also overrode the old definition
for the links that were supposed to be white (.toplink) and now they were
all Teal.
So what I did was add another class:
a:visited.toplink{
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10px;
color: #FFFFFF;
text-decoration: none;
font-weight:bold;
}
a:link.toplink{
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10px;
color: #FFFFFF;
text-decoration: none;
font-weight:bold;
}
a:link.toplink{
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10px;
color: #FFFFFF;
text-decoration: none;
font-weight:bold;
}
This seems to work fine. But DW gives me a styles error that says that
there is an error parsing for IE 5.0.
Is the above definition not the preferred way to handle links?
I was told it was.
Thanks,
Tom
of link styles.
I understand how they work. I am just trying to find if they are legal or
are they going to cause me trouble with older browsers.
Some of my pages were done by someone else who set up their styles to work
like so:
This would turn the links white if they had the links set to something like:
<a href="#" class="toplink>test</a>
..toplink{
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10px;
color: #FFFFFF;
text-decoration: none;
font-weight:bold;
}
This was fine. But I wanted to set up my default links to be teal in color,
so I did the following:
a:visited {
color:#3EA2BC;
text-decoration: none;
}
a:link {
color:#3EA2BC;
text-decoration: none;
}
a:active {
color:#3EA2BC;
text-decoration: none;
}
This works fine for all my links, but it also overrode the old definition
for the links that were supposed to be white (.toplink) and now they were
all Teal.
So what I did was add another class:
a:visited.toplink{
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10px;
color: #FFFFFF;
text-decoration: none;
font-weight:bold;
}
a:link.toplink{
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10px;
color: #FFFFFF;
text-decoration: none;
font-weight:bold;
}
a:link.toplink{
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10px;
color: #FFFFFF;
text-decoration: none;
font-weight:bold;
}
This seems to work fine. But DW gives me a styles error that says that
there is an error parsing for IE 5.0.
Is the above definition not the preferred way to handle links?
I was told it was.
Thanks,
Tom