This is the style info for most of the links on my page:
a:link, a:visited{
color: #0000FF;
text-decoration:none;
}
a:hover, a:active{
text-decoration:underline;
}
I also want to have a few other link to have a different color that that if I put a different class in the <a> tag like this:
<a href=http://www.webdeveloper.com/forum/archive/index.php/"page.asp" class="whiteLink">
I tried putting this in the style sheet but it doesn't work:
.whiteLink{
color:#FFFFFF;
text-decoration:none;
}
The strange thing is, if I make .whiteLink ---> #whiteLink it works, but I need to use it more than one on the page, and I remember reading that you are supposed to use id's only once per page.heavenly,
try this:
.writelink a.link, .writelink a.visited {
color:#FFFFFF;
text-decoration:none;
}
.writelink a.hover, .writelink a.active {
text-decoration:underline;
}
Good luck.I used this instead:
<style>
#topNavLinks{
clear:both;
text-align:right;
background-color:#000000;
white-space:nowrap;
}
#topNavLinks a{
color:#FFFFFF;
text-decoration:none;
}
</style>
...
<div id="topNavLinks">
<a href=http://www.webdeveloper.com/forum/archive/index.php/"#">Link 1</a> <a href="#">Link 2</a> <a href="#">Link 3</a>
</div>
Is that correct CSS? It seemed to work out for me.If it worked fine, then you are ok as long as you only plan on using "#topnavlinks" within that one <div> tag. If you plan on using it in more places throughout the document, then you should change it to a class ".topnavlinks" because IDs are supposed to only be used once throughout a document and class are meant to be used multiple times.
It seems like you only plan on using it that once, so it looks good. Good job.i generally try to avoid using id tags for any links. you are better of using classes incase in working with your site you realize that you want the same formatting again. it's just a good habit to get into.
a:link, a:visited{
color: #0000FF;
text-decoration:none;
}
a:hover, a:active{
text-decoration:underline;
}
I also want to have a few other link to have a different color that that if I put a different class in the <a> tag like this:
<a href=http://www.webdeveloper.com/forum/archive/index.php/"page.asp" class="whiteLink">
I tried putting this in the style sheet but it doesn't work:
.whiteLink{
color:#FFFFFF;
text-decoration:none;
}
The strange thing is, if I make .whiteLink ---> #whiteLink it works, but I need to use it more than one on the page, and I remember reading that you are supposed to use id's only once per page.heavenly,
try this:
.writelink a.link, .writelink a.visited {
color:#FFFFFF;
text-decoration:none;
}
.writelink a.hover, .writelink a.active {
text-decoration:underline;
}
Good luck.I used this instead:
<style>
#topNavLinks{
clear:both;
text-align:right;
background-color:#000000;
white-space:nowrap;
}
#topNavLinks a{
color:#FFFFFF;
text-decoration:none;
}
</style>
...
<div id="topNavLinks">
<a href=http://www.webdeveloper.com/forum/archive/index.php/"#">Link 1</a> <a href="#">Link 2</a> <a href="#">Link 3</a>
</div>
Is that correct CSS? It seemed to work out for me.If it worked fine, then you are ok as long as you only plan on using "#topnavlinks" within that one <div> tag. If you plan on using it in more places throughout the document, then you should change it to a class ".topnavlinks" because IDs are supposed to only be used once throughout a document and class are meant to be used multiple times.
It seems like you only plan on using it that once, so it looks good. Good job.i generally try to avoid using id tags for any links. you are better of using classes incase in working with your site you realize that you want the same formatting again. it's just a good habit to get into.