Accurax Posted October 13, 2006 Share Posted October 13, 2006 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 workI was wondering if there was a special way that email links need to be styled?Thanks guys Link to comment https://forums.phpfreaks.com/topic/23829-how-do-i-style-email-links-with-css/ Share on other sites More sharing options...
Accurax Posted October 13, 2006 Author Share Posted October 13, 2006 Should really think before i post tbhAnyway... 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 https://forums.phpfreaks.com/topic/23829-how-do-i-style-email-links-with-css/#findComment-108222 Share on other sites More sharing options...
dustinnoe Posted October 13, 2006 Share Posted October 13, 2006 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 https://forums.phpfreaks.com/topic/23829-how-do-i-style-email-links-with-css/#findComment-108271 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.