Jump to content


Photo

How do I Style Email links with CSS


  • Please log in to reply
2 replies to this topic

#1 Accurax

Accurax
  • Members
  • PipPipPip
  • Advanced Member
  • 246 posts

Posted 13 October 2006 - 08:27 AM

I have an email address embedded in my site of the form

<a href="mailto:my@email.com?subject=Enquiry">Content here</a>

This code is positioned in the #divheader and is of the class <H1> ....... Now i want to be able to style this email link using css, but the standard method with the div header:

#divheader a:link,#divheader a:visited,#divheader a:active {
	color: #95ABD4;
	text-decoration: none;
}

Doenst seem to work

I was wondering if there was a special way that email links need to be styled?

Thanks guys

#2 Accurax

Accurax
  • Members
  • PipPipPip
  • Advanced Member
  • 246 posts

Posted 13 October 2006 - 08:32 AM

Should really think before i post tbh

Anyway... for anyone else having this problem, the styling of the email link seems to be controlled by the <h1> tag, so:

h1 a:link,h1 a:visited,h1 a:active {
	color: #95ABD4;
	text-decoration: none;

Seems to work fine ............

#3 dustinnoe

dustinnoe
  • Members
  • PipPipPip
  • Advanced Member
  • 187 posts
  • LocationWarner Robins, GA

Posted 13 October 2006 - 12:00 PM

Your best bet would be to assign a class for e-mail links.

.email_link {
	color: #95ABD4;
	text-decoration: none;
}

Then just use the class attribute to apply the style to your e-mail links

<a class="email_link" href="mailto:my@email.com?subject=Enquiry">Content here</a>





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users