SitePoint Sponsor |
|
User Tag List
Results 1 to 5 of 5
Thread: Two sets of link colors
Hybrid View
-
Feb 1, 2000, 04:32 #1
- Join Date
- Feb 2000
- Posts
- 1
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
I was wondering if it is possible to set different sets of link colors on one page.
Basically I have a background with a dark colored bar on the left and white space to the right. I want to have different link colors for each side. is this possible?
Does this make sense?
Thank you!
-
Feb 1, 2000, 09:15 #2
- Join Date
- Aug 1999
- Location
- Lancaster, Ca. USA
- Posts
- 12,305
- Mentioned
- 1 Post(s)
- Tagged
- 0 Thread(s)
<style>
/*light color links */
A.light {color=blue}
A.light:hover {color=purple}
A.light:active {color=purple}
A.light:visited {color=red}
/* dark color links */
A.dark:visited {color=white}
...so on and so forth
</style>
Then in your <A> tags you would put class="light" or class="dark" depending on where the link was.
------------------
Wayne Luke
The Majormud Encyclopedia - www.bloodquest2.com
Come Play one of the hottest games on the net.
-
Feb 2, 2000, 19:51 #3
- Join Date
- Dec 1999
- Location
- Minneapolis, MN, USA
- Posts
- 37
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
I also had to do that sorta thing (have different color navigation links). The only problem I had with that was that Netscape doesn't support that part of CSS (from what I've noticed. Correct me if I'm wrong.), but instead displays the link color in the body tag. So make sure you have a color that is readable in both the dark and light.
Just what I've noticed. Please correct me if I'm wrong about this support thing - because I'd love to know how to fix that.
------------------
John Schrom
Webmaster - 4Webmasters
-
Feb 2, 2000, 20:49 #4ChickenSitePoint Community Guest
What JRS said has a bit o merit since, keep in mind, SOME people use browsers that are not javascript capable (or they turn javascript off). Wouldn't it be nice if everyone used the same thing.
*day dreams for a second* ... ahhhhh
-
Feb 8, 2000, 13:04 #5Ng Soon SengSitePoint Community Guest
Hi,
It's easy, you can have as many color links as you like on a page.
Just try this, it works for me.
Exp: <A HREF="http://www.unitronics.com/"><FONT COLOR="#FF0000">Unitronics</FONT></A>
This code will produce a red text link.
If you have for example a black background and want a yellow text link, then change to:
<A HREF="http://www.unitronics.com/"><FONT COLOR="#FFFF00">Unitronics</FONT></A>
By looking at the code you can choose any link color as you like to match the background color.
This works with NC and IE I have a page on color selection, if you need assistance, visit my site and get the best color with the code generated for you.
Hope this helps as I am often at website reviews section and happen to just cross over to website design section to browse around.
Regards,
NSS http://www.unitronics.com
Bookmarks