CSS or HTML Help With Website Link Please

Messages
2,498
Edit My Images
Yes
Having a bit of a senior moment here or I've been staring at it too long my minds went blank.

I have a url I am adding to a webpage using
Code:
<a href="http://www.thisurlhere.co.uk" target"_blank">UrlName</a>
this link is inside a table cell. I'm trying to change "UrlName" into a single different colour from other links I have within the table. I don't want the change to affect the colour of the rest of the links on the page.

Can this be done? I'm pretty sure it needs a css rule but my efforts at css is very much at the early learning stage. Advice is much appreciated.
 
Last edited:
Hi Frank,

Add class="link" (or similar) to the <a> tag, then add a corresponding CSS rule as .link {color: red}

That should work provided you have no other overriding rules in the CSS

Kev
 
In addition you can use the following CSS to style the link in different states...

a.link:link
a.link:visited
a.link:hover
a.link:active
 
Thanks Kev I'll note that for later, the old brainbox woke up after a coffee. I used
Code:
<a href="http://www.thisurl.co.uk" style="color: rgb(250,236,235)"><font color="#faebb">UrlName</font></a>
And it works a treat on the 5 most popular browsers fine also on tablet and phone. I'm a happy chappy now.

Thanks for you replies.
 
Back
Top