How to set the colors of a Hyperlink via CSS class

Hello,

How do we create a CSS class which class when added to a Hyperlinked text will cause it to:
1- Have no underline
2- Have underline when OnMouseover
3- Have color white as a link and as a visited link
4- Have color yellow when OnMouseover

You can see the sample page, we are working on, and cannot get it to work exactly as we want, here:

The css class name for this purpose is: no_link
As you can see CSS code we have is working in regard to Text decoration, but nothing else!

Thanks

a:link.no_link, a:visited.no_link {text-decoration: none;
	color: #fff;}
	
a:hover.no_link, a:focus.no_link {text-decoration: underline;
	color: #ff0;}

That seems to do what you want.

3 Likes

Hi there WorldNews,

it appears that you are working on a late twentieth century site. :mask:

I would suggest, in light of the validator’s comments…

http://validator.w3.org/check?verbose=1&uri=https%3A%2F%2Fwww.anoox.com%2Fabout_us_test.php

…that you seriously consider rewriting it completely from scratch. :yum:

coothead

3 Likes

It does look to have a mix of HTML5 style tags and XHTML4 transitional style tags.
And a mess of deprecated element attributes that although some browsers may still support their use, can not be relied upon for continued browser support.

IMHO “transional” means just that.
And even though it meant “changing to XHTML strict” at the time, I think so much time has since passed that changing to HTML5 would be the way to go.

1 Like

Thanks. This seems to do the job perfect :slight_smile:

Cheers,

1 Like

Thanks for your comment.
We are a Volunteer based Site. So you are welcome to Volunteer to provide new code for pages you want to.

Cheers,
Dean @ Anoox

Thanks for your comment.
Since we are a Volunteer based Site, you are welcome to Volunteer to provide new code for pages you want to.

Cheers,
Dean @ Anoox

Yes, you have posted that as a dodge for not doing what needs to be done before.

If you don’t want to upgrade the site to HTML5, you can of course stay with XHTML Transitional.

Only don’t try using HTML5 syntax and features and expect them to work.

3 Likes

That is not a “Dodge”.
We are a Volunteer based non-profit Social Search network with the mission to provide an alternative choice in regard to searching and social networking to Big Wall Street Media. Which of course means we have a very ambitious goal and tiny resources compared to our Wall Street compatriots. As such we welcome every concerned person (Developer) to get involved with us as Thinker or Developer. More here:
https://www.anoox.com/get_involved.php

So we would absolutely welcome, for example you taking over of providing HTML5 (new design) code for some of our pages. Just follow the Volunteer link.

Cheers
Dean @ Anoox

Looking at my post now I see that it could have come across harsh.
I apologize, I did not mean it in a negative way, simply that the reasons are not valid and that you are not acknowledging what other options you have.

Unfortunately I can not take on a project no matter how generous a stipend you are offering.

However, I am, and I’m certain many others here are as well, more than willing to offer assistance as time allows to you or others in your network.

That is, instead of asking for help on how to “pour new wine into old wineskins”, you could start a topic something like “here is an old XHTML style template, how can I change it to HTML?” and I am sure you would get step-by-step suggestions on what to change.

The good news is you don’t need to change all of the templates at the same time, you could start with a more simple / less used one at first to gain some footing.

My main point, for this forum at least, is that members here are very generous in sharing their knowledge and offering help on their own terms, but not so much when it comes to doing work for someone else uncompensated or otherwise.

IMHO the best course to take is for either you or others in your network to roll up the shirt sleeves, open up a text editor, and make a beginning effort.

5 Likes

Again, we are a Volunteer based non-profit Social Search network with the mission to provide an alternative choice in regard to searching and social networking to Big Wall Street Media. A Volunteer position as all Volunteer positions does not offer any “stipend”, but you are doing such work for free, the compensation coming from knowing that you are contributing to something that can benefit countless World Wide beyond yourself, the compensation coming from realizing that offering Choice in regard to the all important Search engine, is a very good thing, more on this here:
https://www.anoox.com/why_anoox.php
Of course after having done some Volunteer work for us we can then look into offering some compensation, but all Volunteers start work as Volunteers. Just as if you had done Volunteer work for Linux, MySQL, etc. With that said, we are doing our best with the tiny resources that we have compared to our Wall Street Goliath’s and thanks for the contribution you have made so far.

Cheers
Dean

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.