|
|
|
Sheepeth
new user
Reg'd: Tue
Posts: 20
|
|
Having a problem with multiple stylesheets for a single html document.
I want to use more than one style for the page i'm creating. I have links using the 'A:Link' - 'A:visited' style etc. But I want to have different styles for different links. I.E. Some links have a white background so the links need to be black on 'hover' and some links on the page have a dark bg so I need those to have a white 'hover'.
I originally created 2 different stylesheets for each type of link, but the latter of the css sheets overides the preceding one when linking externally.
I have tried using different classes and also embedding different styles within stylesheets themselves but nothing works.
How do you actually get stylesheets to work without conflicts?
An example of what i want is here http://www.dwp.gov.uk/ the links at the top are different styles or maybe http://www.cps.gov.uk/
-------------------- You can't beat an egg!..............no wait!!1
|
|
Sam
regular
Reg'd: Tue
Posts: 432
|
|
Have you tried...
a:hover {text-decoration: none; color: white;} a.nav:hover {text-decoration: none; color: black;}
..and...
<a href="page1.html">White</a> <a class="nav" href="page2.html">Black</a>
There's a full explanation here:
http://www.yourhtmlsource.com/stylesheets/csslinks.html
|
|
|