website help please

aidan1980

Free Member
Jan 16, 2008
1,321
149
Leicester
Just a small one

I have a website which has been built etc but have a question.

I have some text that I now what to use as anchor text in a link but when I link it it becomes underlined and changed the font colour.

how can I link out from there but keep the text colour the same as it was and with no underline?
 
O

Oakleaf Studio UK

a:hover {text-decoration:none; color:#333333}

or colour of your choice

Or if you want to just target that link in isolation, then you need to assign that link a class.

Eg: <a href="#" class="new">Your link</a>


Then the CSS would be

.new {text-decoration:none; color:#333333}
.new:hover {text-decoration:none; color:#333333}

Hope that helps!
 
Upvote 0

menetworkjadaltd

Free Member
Dec 14, 2011
618
88
May I just throw in my hat...

The reason for having different format for links is a very good one... I would suggest that if you do change the formatting, that you change it to a colour which is not the same as your content.

Code:
p.content {
font-family: arial;
color: #000000; }

a:link {
font-family: arial;
font-weight: bold;
color: #cc0000;
text-decoration: none; } 

a:hover {
color: #cc0000;
text-decoration: underline; } 

a:visited {
color: #cc0000;}
 
  • Like
Reactions: cmcp
Upvote 0
T

TotallySport

just out of interest are you saying that the other links are all what you want but you want to add a new link and have it the same as the others?

if so, then there is a class element in the other links simply add it to the a tags in the link you want.
 
Upvote 0

astutiumRob

Free Member
May 5, 2004
1,312
241
London
I have some text that I now what to use as anchor text in a link but when I link it it becomes underlined and changed the font colour.
Yes, all designed to be visual clues to the use that it;s a link (and whether or not they've already been there).

Why do you want to "override" one of the most useful things about HTML ?
 
Upvote 0

UKSBD

Moderator
  • Dec 30, 2005
    13,033
    1
    2,831
    probably because he ahs loads of links and doesn't want them to look like links :)

    On a side issue.

    As google is seen as devaluing boilerplate links do you think it gives more value to links on pages that are displayed in bodytext AND receive more natural clicks?

    I've moved away from blending links in to bodytext and make my important links more prominant so as to encourage more clicks on them.

    I wrote a blog post about this a few months ago
    (search for *Make your important links more prominent*)
    and would be interested to hear other peoples opinions.
     
    Upvote 0

    Latest Articles

    Join UK Business Forums for free business advice