Jump to content

Archived

This topic is now archived and is closed to further replies.

Accurax

How do I Style Email links with CSS

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

Share this post


Link to post
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 ............

Share this post


Link to post
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]

Share this post


Link to post
Share on other sites

×

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.