Solved: Two css

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

dannyn

Thread Starter
Joined
Nov 8, 2007
Messages
1,689
Can you use two differnt linked style sheets.
The reason for me wanting to do this:
-I want some link colors to behave differently from others.
 

dannyn

Thread Starter
Joined
Nov 8, 2007
Messages
1,689
Yeah, I know that but here is my problem..
First I want to link to the, in the head tag.
I would just use differnt selectors and were set..
but the trouble is..
a:link is always is the same selector so how do I work that?
 
Joined
Mar 23, 2008
Messages
103
I'm not completely sure what your asking.
Are you saying you want a linked style sheet and an in-HTML style sheet?

In a case of linked vs. in-HTML style sheets, the in-HTML style sheet always wins. So if you have conflicting statements in the two different style sheets, the in-HTML style sheet will always rule.

But... I don't see why you don't just link it all or keep it all in-HTML. Just add some classes to the styles for different links.
 

dannyn

Thread Starter
Joined
Nov 8, 2007
Messages
1,689
One linked css
Here is what I want.
I want one link, before click, to be white.
I want another link, before click, to be blue.
You have the a:link....
oooo wait... this is where you could use a class vs. id.
What would be the css code for this?
 
Joined
Mar 23, 2008
Messages
103
In the <head> section...

Code:
<style type="text/css">
a.white {
color: white;
}

a.blue {
color: blue;
}

</style>

And in the <body> section...

HTML:
<a href="http://www.mywebsite.com" class="white">This link in white.</a>
<a href="http://www.myotherwebsite.com" class="blue">This link is blue.</a>

Did you also want the links to turn different colors when you put your mouse on them?
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 807,865 other people just like you!

Latest posts

Members online

Top