Collected by Elizabeth Janson Home Page |
|
Do not change the link colors unless you have to. With most background colors, the defaults should still be fine. If you do need to change the link colors, use a color that is bright, and high-contrast to the background color, for links to pages which have not yet been visited. Use a duller version of that same color for links that have already been followed.
Customize how links appearWith style sheets you have a lot more control over how links appear on your pages - no longer the boring underlined colored text that is the default in most browsers. As well as allowing you to make your pages look a little individual, this also means you can make different types of links look different. The most simple example of this is to have links that go to other sites look different from links which go to other parts of the same site.Links can do many things. They can point to email addresses, other parts of the same page, other parts of the same site, or different sites altogether. And we don't really know which of these a little bit of underlined blue text is until we move the mouse over it and inspect the url, or possibly until we click the link. Combining Class and the Link SelectorHere is the tricky part. We need to combine the link selectors with class selectors. To do this, we use the following formA.class-name:link-state for example The selector to select email links in the active state is A.email:active see the dot before the class name, then the colon.
A.onsite:link {background-color: #ccffcc}
A.offsite:link {background-color: #ffccff}
A.email:link {background-color: #00ffff} Sample links are defined with class="onsite" or class="email" eg: <a class="onsite" href="...">...</a>
non-existent orange file
How many Link attributes can we define? |
CSS begins here |
|
This page is part of Elizabeth Janson's web site
http://www.oocities.org/elizatk/index.html
Tetbury residents in the Eighteenth Century my Australian Family History and Barrie, our Family Poet. |