Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
CSS/HTML Help
Re: CSS/HTML Help
#5
Bob (and sweno),
 
Quote:.copyright:link { color: #976907; }

.copyright:visited {color: #B75905; }
I don't think this will work as written.  I believe that you'd need the a:link selector in order for it to work properly.
Using Bob's css from the sample page:
/* Define a class for the copyright notice. */
p.copyright {
  vertical-align:bottom;
}
.copyright a:link {color: #fff}
.copyright a:visited {color: #fff}
will give the unvisited link and visited link the color (white in this case.)

Basically all you are doing here is creating a contextual selector (think of it as a "chained" list of selectors.)  It says that for any selector of the type 'a' within any selector with the class .copyright look at the :link and :visited pseudo-classes and apply the selected property.
This site might be a little clearer:  http://htmlhelp.com/reference/css/structure.html
Remember, if you do use the :hover option that it goes AFTER the :link
and :visited or it will not work correctly in some browsers.
Keith
Reply


Messages In This Thread
CSS/HTML Help - by Bob Schroeck - 02-20-2008, 08:51 PM
Re: CSS/HTML Help - by bmull - 02-21-2008, 12:27 AM
[No subject] - by Bob Schroeck - 02-21-2008, 03:41 AM
[No subject] - by sweno - 02-21-2008, 04:46 AM
Re: CSS/HTML Help - by bmull - 02-21-2008, 05:58 AM
[No subject] - by sweno - 02-21-2008, 11:19 AM
[No subject] - by Bob Schroeck - 02-21-2008, 03:55 PM
[No subject] - by robkelk - 02-21-2008, 04:11 PM
[No subject] - by Bob Schroeck - 02-21-2008, 04:14 PM
Re: CSS/HTML Help - by bmull - 02-22-2008, 07:48 AM
[No subject] - by Bob Schroeck - 07-18-2008, 02:51 AM
Re: CSS/HTML Help - by bmull - 07-31-2008, 05:33 AM
[No subject] - by Bob Schroeck - 07-31-2008, 01:31 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)