473,228 Members | 1,820 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,228 software developers and data experts.

styles and email readers - consistency

I am using phpmailer to output emails.

The CSS features work great in OE but a few of the features break down
in Yahoo, and Hotmail.

Specifically I can't get the underline feature to work on
a:hover in yahoo, and the text color for links and the a:hover
fails completely in Hotmail readers.

A very short list of my link code for all the news readers.
OE, Yahoo, Hotmail, haven't tried Yahoo yet.

<style type="text/css">
a:visited {
color: #FFFFFF;
}
a:link {
color: #FFFFFF;
}
a:hover {
color: #FFFFFF;
text-decoration: underline;
background-color: #092F5E;
}
a {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: .8em;
font-weight: 700;
color: #FFFFB7;
text-decoration: none;
}
</style>

I have considered doing inline styles, but that seems very complicated for a
lot of links.
Ideas would be most welcome.

Thank You
Kevin
Aug 15 '07 #1
9 2547
Kevin Raleigh wrote:
I am using phpmailer to output emails.

The CSS features work great in OE but a few of the features break down
in Yahoo, and Hotmail.
Don't waste too much energy trying to get fancy CSS working in email,
especially web mail. Email systems are way behind browsers in this area,
and don't expect it to get much better any time soon.
Specifically I can't get the underline feature to work on
a:hover in yahoo
Surprisingly, web mail systems seem worse off than regular mail clients
where it comes to CSS. I've seen some painful things spew forth from
comcast web mail.
I have considered doing inline styles, but that seems very complicated for a
lot of links.
You'll get the most consistent results with inline styles. Some mail
systems strip out code in the <headso will drop any embedded
stylesheet you put there.
Ideas would be most welcome.
Keep it simple is especially appropriate for HTML email.

--
Berg
Aug 15 '07 #2
I have considered doing inline styles, but that seems very complicated
for a
lot of links.

You'll get the most consistent results with inline styles. Some mail
systems strip out code in the <headso will drop any embedded
stylesheet you put there.
Can you give me an example of an inline style that encompasses all that I
need? I looked over my book from Eric Meyer but he is pretty thin on
inline links.

What I would like to do is drop in a CSS style on a <spantag that
encompasses
my right hand navigation using these styles.
<style type="text/css">
a:visited {
color: #FFFFFF;
}
a:link {
color: #FFFFFF;
}
a:hover {
color: #FFFFFF;
text-decoration: underline;
background-color: #092F5E;
}
a {
font-family: Verdana;
font-size: .8em;
font-weight: 700;
color: #FFFFB7;
text-decoration: none;
}

Is this possible?
Or am I asking way to much of html mail programs?

Kevin
Aug 15 '07 #3
On 15 Aug, 03:37, "Kevin Raleigh" <krale...@sbcglobal.netwrote:
The CSS features work great in OE but a few of the features break down
in Yahoo, and Hotmail.
Fancy CSS rules generally work OK in email, but fancy CSS selectors
don't. If you inline your CSS into style attributes on elements rather
than placing it in a stylesheet (even an internal stylesheet), it's
more likely to survive. The downside is that you lose the ability to
use pseudo-element selectors like :hover.

There are also limits on how you can style <body>. Generally wrapping
everything in one large <div class="content" and styling on that is
more robust.

You _may_ find (for some email readers) that a non-valid inline
stylesheet <stylein the <bodyof the message survives better than a
valid one inside <head(and also allows :hover). As duplicated CSS
isn't a problem, you can just supply two copies of the same
stylesheet.

There are websites out there listing known variations for Yahoo,
Gmail, Hotmail etc. Desktop and mobile email clients are a bit less
well described.

Aug 15 '07 #4
In article <eo******************************@giganews.com>,
"Kevin Raleigh" <kr******@sbcglobal.netwrote:
I have considered doing inline styles, but that seems very complicated
for a
lot of links.
You'll get the most consistent results with inline styles. Some mail
systems strip out code in the <headso will drop any embedded
stylesheet you put there.
Can you give me an example of an inline style that encompasses all that I
need? I looked over my book from Eric Meyer but he is pretty thin on
inline links.

What I would like to do is drop in a CSS style on a <spantag that
encompasses
my right hand navigation using these styles.
Let me see if I understand this correctly: you are sending out
html e-mails, which include a navigation bar/pane? In other words,
you are e-mailing web pages to people?

Wouldn't it be a lot simpler to send out a simple, plain text
e-mail with a brief text and a link to a web site page? That
way, you wouldn't have to worry about web mail systems mangling
your styles at all.

Plus, if your e-mails happened to end up with someone like me,
who quite deliberately turns OFF html rendering in their mail
client (and hardly ever uses web mail), your e-mail would still
be readable...

[snip]
a {
font-family: Verdana;
font-size: .8em;
On my computer, in my browser, this would be almost too small
to be clearly legible.
Aug 15 '07 #5
Kevin Raleigh wrote:
>
What I would like to do is drop in a CSS style on a <spantag that
encompasses
a:visited
a:link
a:hover
You can't do pseudo classes or pseudo elements with inline styles.
Or am I asking way to much of html mail programs?
I think you are. The simpler you make it, the less likely it will be
mangled by a deficient mail reader. And there are plenty of those about.

--
Berg
Aug 15 '07 #6
You can't do pseudo classes or pseudo elements with inline styles.
Or am I asking way to much of html mail programs?

I think you are. The simpler you make it, the less likely it will be
mangled by a deficient mail reader. And there are plenty of those about.
I appreciate all the insight and the feedback.
Will simplfy it...
Kevin
Aug 16 '07 #7
There are also limits on how you can style <body>. Generally wrapping
everything in one large <div class="content" and styling on that is
more robust.
Will give that a try
There are websites out there listing known variations for Yahoo,
Gmail, Hotmail etc. Desktop and mobile email clients are a bit less
well described.

How would I search on this??
I would be interested in seeing how far I can push the envelope.
But right now, I will simplfy my code until I can do some testing.

Kevin ;-)
Aug 16 '07 #8
On 16 Aug, 06:02, "Kevin Raleigh" <krale...@sbcglobal.netwrote:
How would I search on this??
http://alistapart.com/articles/cssemail

http://groups.google.co.uk/group/alt...f0bffed853df5e

Aug 16 '07 #9

"Andy Dingley" <di*****@codesmiths.comwrote in message
news:11*********************@57g2000hsv.googlegrou ps.com...
On 16 Aug, 06:02, "Kevin Raleigh" <krale...@sbcglobal.netwrote:
How would I search on this??

http://alistapart.com/articles/cssemail

http://groups.google.co.uk/group/alt...f0bffed853df5e
>
Thank You
Will review it
Kevin
Aug 20 '07 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: Markus Breuer | last post by:
I have a question about oracle commit and transactions. Following scenario: Process A performs a single sql-INSERT into a table and commits the transaction. Then he informs process B (ipc) to...
12
by: dan.vendel | last post by:
Hi, I know nothing about javascript, but quite a lot about regulat html and CSS. Have bumped into a problem that people in this fine congregation perhaps can help me with. I'm making a...
9
by: Terry Olsen | last post by:
Is there a way to turn on XP Styles in 2003? Or is the manifest file still the way to go?
2
by: Jeremy Clulow | last post by:
Hi, I've designed a site at http://www.welsh-kitchens.com When all styles are disabled it looks like this http://www.welsh-kitchens.com/index-nocss.shtml I've tried creating a printing...
16
by: anya | last post by:
Hey, I have a certain problem and till now I didnt find an answer on the web. I want to send an email message with picture in it. I dont want to put it as attachment but make it in the body of...
1
by: appleboy | last post by:
Hello to all, and sorry about my poor english :) I am trying to assign inline styles thru javascript or directly into the element parameters. E.j: <span style="font-size:5em;"> I would like...
3
by: hestres | last post by:
Hello, I'm working on some link styles for this page: http://www.house.gov/velazquez/lh0205tres/reports.html I want all the links to always display in red (#CC0000), but in IE6 and 7 they...
4
by: splounx | last post by:
Hi there, I am a relative CSS & JavaScript novice and I have a particular problem that is beyond my level of knowledge so I thought I'd tap the collective wisdom of this group. I would like...
5
by: fleemo17 | last post by:
Over the course of building a very large site, I've wound up with an enormous style sheet containing plenty of superfluous styles. Is there a tool that can recognize which styles are not being used...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.