Hello


I am a beginner to css, i coded a page where everything is shown fine, except for one problem: The links on the page are all in white, which also happens to be the page background.

I would like all links on the page to be shown in black color, how is this coded. Also I would like to mention here that a number of elements on the page load from different external css files

Regards
Arvind

The default color of link is blue. But if you have defined some class in CSS file, than link color will appear as you have defined in class.

CSS code should be something like this

a:link { 
	color: #333333;
	}
a:visited { 
	color: #00000;
	}
a:hover { 
	color: #CCCCCC;
	background-color: #333333;
	text-decoration: none;
	}
a:active { 
	color: #456980;
	}

Moreover you can make class for specific use of css such as

loginLink.a:link { 
	color: #333333;
	}
.loginLink a:visited { 
	color: #00000;
	}
.loginLink a:hover { 
	color: #CCCCCC;
	background-color: #333333;
	text-decoration: none;
	}
.loginLink a:active { 
	color: #456980;
	}a:link { 
	color: #333333;
	}
.loginLink a:visited { 
	color: #00000;
	}
.loginLink a:hover { 
	color: #CCCCCC;
	background-color: #333333;
	text-decoration: none;
	}
.loginLink a:active { 
	color: #456980;
	}

and then use it like that <a href="expvice.com" alt='We are 24 hours online for helping in programming' css='loginLink'>Login</a>

Member Avatar for ingeva
loginLink.a:link {
color: #333333;
}

<a href="expvice.com" alt='We are 24 hours online for helping in programming' css='loginLink'>Login</a>

Ehhh... shouldn't that be class='loginLink' ? :)

Hello all

Thanks for the help, I found the code where the css had specified the link color as white and I have corrected it, it is now displaying fine.

Thanks again,
Arvind

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.