Jump to content

How do I Style Email links with CSS


Accurax

Recommended Posts

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

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

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:

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

Doenst seem to work

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

Thanks guys
Link to comment
Share on other sites

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:

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

Seems to work fine ............
Link to comment
Share on other sites

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

[code]
.email_link {
color: #95ABD4;
text-decoration: none;
}
[/code]

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

[code]
<a class="email_link" href="mailto:my@email.com?subject=Enquiry">Content here</a>
[/code]
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.