Jump to content
xisto Community
Sign in to follow this  
suicide1405241470

CSS Link Problem

Recommended Posts

I have multiple links on my page, but a few of them are in a table with a dark background, while others are on a light background. I have them in css sheets, but I was wondering how you would go about creating them so that the link color, active link, and visited link are different for both of them?

Share this post


Link to post
Share on other sites

you can just put them in a single css file and do this for each table row or column:

for the dark table links you can do this:

.darklink a:link, a:active, a:visited, a:hover {	color: #ffffff;	text-decoration: underline;	font-weight: bold;}
the links become light as the background is dark.

for the light table links do this:
.lightlink a:link, a:active, a:visited, a:hover {	color: #000000;	text-decoration: underline;	font-weight: bold;}
the links become dark as the background is light.

now all you have to do is on the table row or column which is dark add this to it:
class="darklink"

for the light column or row do this:
class="lightlink"

hope that helps some.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.