Link color problem

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
Karl
Forum Newbie
Posts: 4
Joined: Mon Nov 04, 2002 6:54 pm

Link color problem

Post by Karl »

Not fully php problem but you guys may be able to help...
I use CSS for the link colors (hover and such)
But then I have came across the problem of on one of the pages, just for 5 links I want to change the color of the links from green to red (including hover color too) Anyone know how to do this?
Thanks
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

you may either wait for full css2 compliance or place the links in different <div>s with different classes
e.g.

Code: Select all

<html>
<head><style type="text/css">
.class1 a &#123; color: #ff0000; &#125;
.class2 a &#123; color: #00ff00; &#125;
</style></head>
<body>
	<div class="class1">
		<a href="javascript:void(0);">click</a>
	</div>
	<div class="class2">
		<a href="javascript:void(0);">click</a>
	</div>
</body>
</html>
Karl
Forum Newbie
Posts: 4
Joined: Mon Nov 04, 2002 6:54 pm

Thanks

Post by Karl »

Thanks for that, I will give it a go :)
Karl
Forum Newbie
Posts: 4
Joined: Mon Nov 04, 2002 6:54 pm

w00t

Post by Karl »

Yeah it worked :) Thanks Very Much For That :)
Post Reply