Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 12
  1. #1
    Senior Member Holokai's Avatar
    Join Date
    Sep 2004
    Location
    Honolulu, HI
    Posts
    127
    Member #
    7707
    Hey gang,

    I'm trying to format a link in an HTML email. So, rather than the link showing up as the standard blue, or purple if the target has been visited, I'd like it to be, say, orange.

    I know this can be done in CSS in the headers or an external style sheet with a:link, etc, but I can't do that since this is an email. The only CSS I can use is inline.

    Thanks for any help!
    - Chris
    -----------------------------------------------
    I know just enough to be dangerous to myself and others around me... I'm more of a CSS kamikaze than a CSS ninja...

  2.  

  3. #2
    Senior Member
    Join Date
    Jun 2005
    Location
    Atlanta, GA
    Posts
    4,146
    Member #
    10263
    Liked
    1 times
    There is nothing different about the inline variant of CSS, and you should be able to override the regular stylings with it; is it being superseded somehow?

  4. #3
    Senior Member Holokai's Avatar
    Join Date
    Sep 2004
    Location
    Honolulu, HI
    Posts
    127
    Member #
    7707
    Quote Originally Posted by Shadowfiend
    There is nothing different about the inline variant of CSS, and you should be able to override the regular stylings with it; is it being superseded somehow?
    I don't believe so. There is a difference for link stylings though, as they have concrete class names. Since class names cant be declared/defined inline, how do you style a:link?

    - Chris
    -----------------------------------------------
    I know just enough to be dangerous to myself and others around me... I'm more of a CSS kamikaze than a CSS ninja...

  5. #4
    Senior Member
    Join Date
    May 2003
    Location
    UK
    Posts
    2,354
    Member #
    1326
    If you want to style some links and not others, you can.

    http://www.echoecho.com/csslinks.htm shows you how.

  6. #5
    Senior Member Holokai's Avatar
    Join Date
    Sep 2004
    Location
    Honolulu, HI
    Posts
    127
    Member #
    7707
    Quote Originally Posted by bfsog
    If you want to style some links and not others, you can.

    http://www.echoecho.com/csslinks.htm shows you how.
    I think you are not seeing the problem. You can't have a style section in html emails, so how can you define a:link?

    - Chris
    -----------------------------------------------
    I know just enough to be dangerous to myself and others around me... I'm more of a CSS kamikaze than a CSS ninja...

  7. #6
    Senior Member
    Join Date
    Jun 2005
    Location
    Atlanta, GA
    Posts
    4,146
    Member #
    10263
    Liked
    1 times
    Well, pseudo-classes are less specific than inline styles. If you want to style the link differently on hover and such, you're in hot water. However, if you just want to style the link to be one color regardless, you should be able to use inline styles.

    If you want to differentiate between [minicode]a:link[/minicode] and [minicode]a:visited[/minicode], that'll be an issue, basically. Some email clients do, however, provide support for inline style blocks -- just FYI. This article details the CSS support of various email clients. Looks like style blocks are fairly well supported, with the notable exception of Gmail.

  8. #7
    Senior Member Holokai's Avatar
    Join Date
    Sep 2004
    Location
    Honolulu, HI
    Posts
    127
    Member #
    7707
    Quote Originally Posted by Shadowfiend
    Well, pseudo-classes are less specific than inline styles. If you want to style the link differently on hover and such, you're in hot water. However, if you just want to style the link to be one color regardless, you should be able to use inline styles.

    If you want to differentiate between [minicode]a:link[/minicode] and [minicode]a:visited[/minicode], that'll be an issue, basically. Some email clients do, however, provide support for inline style blocks -- just FYI. This article details the CSS support of various email clients. Looks like style blocks are fairly well supported, with the notable exception of Gmail.
    Nope! I just want the ling to be a different color, and I thought the only way to do that was with a:link. How would I do what you're suggesting inline? Thanks!

    -Chris
    -----------------------------------------------
    I know just enough to be dangerous to myself and others around me... I'm more of a CSS kamikaze than a CSS ninja...

  9. #8
    Senior Member filburt1's Avatar
    Join Date
    Jul 2002
    Location
    Maryland, US
    Posts
    11,774
    Member #
    3
    Liked
    21 times
    CSS support in Outlook 2007 is atrocious because, unlike Outlook 2003, it renders messages using Word. Nearly every other client is equally as useless. You're lucky to get it working inline at all, and it would be nothing short of a miracle to even have an embedded stylesheet work consistently across browsers.

    Sadly, the most reliable method would be an image, or just not styling the text significantly.
    filburt1, Web Design Forums.net founder
    Site of the Month contest: submit your site or vote for the winner!

  10. #9
    Senior Member Holokai's Avatar
    Join Date
    Sep 2004
    Location
    Honolulu, HI
    Posts
    127
    Member #
    7707
    Quote Originally Posted by filburt1
    CSS support in Outlook 2007 is atrocious because, unlike Outlook 2003, it renders messages using Word. Nearly every other client is equally as useless. You're lucky to get it working inline at all, and it would be nothing short of a miracle to even have an embedded stylesheet work consistently across browsers.

    Sadly, the most reliable method would be an image, or just not styling the text significantly.
    I agree with all that, but for what I am doing outlook has been ok so far. I have a table layout(because of lack of css support) and everything works in all email clients I have tested, except the link color. I can redo the image behind the link, but would prefer an alternate fix. Also, an image alone = a blank email when images are off by default, even if you proved a seperate mime boundary that is text only

    - Chris
    -----------------------------------------------
    I know just enough to be dangerous to myself and others around me... I'm more of a CSS kamikaze than a CSS ninja...

  11. #10
    Senior Member
    Join Date
    Jun 2005
    Location
    Atlanta, GA
    Posts
    4,146
    Member #
    10263
    Liked
    1 times
    What I'm picturing is

    HTML Code:
    <a href="http://www.whatever.com/wherever" style="color: rgb(0,12,122);">A link!</a>
    Warning: not tested


Page 1 of 2 1 2 LastLast

Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Search tags for this page

email link format

Click on a term to search for related topics.
All times are GMT -6. The time now is 11:01 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com