473,499 Members | 1,948 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Style with HTML mail

Hi there,

I'm looking for the function used on the yahoo webmail which rewrite stylesheet.
I developped a webmail and had a problem with mails using style associates on global tag (ie body)
In fact, when the body tag has a style, my whole page is using this style ...
The yahoo webmail modify the mail code to put the mail in a div with an id (called "message").
And all the styles are prefixed by the name of the div.
So, this code :
<STYLE type=text/css>
BODY {
BACKGROUND-COLOR: #f3e2b7; TEXT-ALIGN: center
}
A {
COLOR: #863586; TEXT-DECORATION: none
}
H1, H2 {
COLOR: #863586;
}
</STYLE>
Become that :
<STYLE type=text/css>
#message BODY {
BACKGROUND-COLOR: #f3e2b7; TEXT-ALIGN: center
}
#message A {
COLOR: #863586; TEXT-DECORATION: none
}
#message H1, #message H2 {
COLOR: #863586;
}
</STYLE>

Do you know the function which allow that ??
Thanks in advance

Fred
Nov 3 '05 #1
6 1945
Frédéric Vailleau wrote:
Hi there,

I'm looking for the function used on the yahoo webmail which rewrite
stylesheet. I developped a webmail and had a problem with mails using
style associates on global tag (ie body) In fact, when the body tag has a
style, my whole page is using this style ... The yahoo webmail modify the
mail code to put the mail in a div with an id (called "message"). And all
the styles are prefixed by the name of the div. So, this code


<snip>

Hi Fred, this is a PHP NG.
Why don't you try a NG that concerns email or stylesheets/DHTML?

Regards,
Erwin Moller
Nov 3 '05 #2
Hi Erwin, and thanks for your answer
But ... what do you mean when you told me about PHP NG ???
I don't know what it is...

"Erwin Moller"
<si******************************************@spam yourself.com> a écrit dans
le message de news: 43***********************@news.xs4all.nl...
Frédéric Vailleau wrote:
Hi there,

I'm looking for the function used on the yahoo webmail which rewrite
stylesheet. I developped a webmail and had a problem with mails using
style associates on global tag (ie body) In fact, when the body tag has a
style, my whole page is using this style ... The yahoo webmail modify the
mail code to put the mail in a div with an id (called "message"). And all
the styles are prefixed by the name of the div. So, this code


<snip>

Hi Fred, this is a PHP NG.
Why don't you try a NG that concerns email or stylesheets/DHTML?

Regards,
Erwin Moller

Nov 3 '05 #3
OK, sorry ....
NewsGroup ...
I beg your pardon !!

"Frédéric Vailleau" <fv*******@sqli.com> a écrit dans le message de news:
dk**********@s1.news.oleane.net...
Hi Erwin, and thanks for your answer
But ... what do you mean when you told me about PHP NG ???
I don't know what it is...

"Erwin Moller"
<si******************************************@spam yourself.com> a écrit
dans le message de news: 43***********************@news.xs4all.nl...
Frédéric Vailleau wrote:
Hi there,

I'm looking for the function used on the yahoo webmail which rewrite
stylesheet. I developped a webmail and had a problem with mails using
style associates on global tag (ie body) In fact, when the body tag has
a
style, my whole page is using this style ... The yahoo webmail modify
the
mail code to put the mail in a div with an id (called "message"). And
all
the styles are prefixed by the name of the div. So, this code


<snip>

Hi Fred, this is a PHP NG.
Why don't you try a NG that concerns email or stylesheets/DHTML?

Regards,
Erwin Moller


Nov 3 '05 #4
I'm using PHP tu develop my webmail and I'm looking for a PHP function with
regular expression maybe !
Fred

"Erwin Moller"
<si******************************************@spam yourself.com> a écrit dans
le message de news: 43***********************@news.xs4all.nl...
Frédéric Vailleau wrote:
Hi there,

I'm looking for the function used on the yahoo webmail which rewrite
stylesheet. I developped a webmail and had a problem with mails using
style associates on global tag (ie body) In fact, when the body tag has a
style, my whole page is using this style ... The yahoo webmail modify the
mail code to put the mail in a div with an id (called "message"). And all
the styles are prefixed by the name of the div. So, this code


<snip>

Hi Fred, this is a PHP NG.
Why don't you try a NG that concerns email or stylesheets/DHTML?

Regards,
Erwin Moller

Nov 3 '05 #5
Frédéric Vailleau wrote:
I'm using PHP tu develop my webmail and I'm looking for a PHP function
with regular expression maybe !
Fred


Ok. :-)

It is just that your problem has little to do with PHP.
Of course this NG is filled with great hackers, so you might get lucky. :-)

I just wanted to tell you that you might get answers a lot quicker in
another NG.

But if you need help with regexpr and PHP, this is the place of course.

Good luck.

Erwin Moller
Nov 4 '05 #6
Frédéric Vailleau <fv*******@sqli.com> wrote:

I'm looking for the function used on the yahoo webmail which rewrite stylesheet.
I developped a webmail and had a problem with mails using style associates on global tag (ie body)
In fact, when the body tag has a style, my whole page is using this style ...
The yahoo webmail modify the mail code to put the mail in a div with an id (called "message").
And all the styles are prefixed by the name of the div.
So, this code :
<STYLE type=text/css>
BODY {
BACKGROUND-COLOR: #f3e2b7; TEXT-ALIGN: center
}
...

Become that :
<STYLE type=text/css>
#message BODY {
BACKGROUND-COLOR: #f3e2b7; TEXT-ALIGN: center
}
...

Do you know the function which allow that ??
Thanks in advance


There is no single function to do this, and no regular expression will be
enough, either. You will have to write your own code to scan through the
HTML, looking for <style> tags, and parse them yourself.

<style> sheets are usually nicely formatted, so it should be easier than
general-case HTML parsing.
--
- Tim Roberts, ti**@probo.com
Providenza & Boekelheide, Inc.
Nov 6 '05 #7

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

Similar topics

13
40620
by: Dan R Brown | last post by:
I have a large form that is generated dynamically in a jsp using xml / xslt. So, to break up this form into several "tabbed" sections, I break up the form using <div> tags. Each <div...
4
4651
by: mike | last post by:
regards: <a href="JavaScript:loadwindow(106,90);" style="font-family:Verdana;">元智Intranet</a> In HTML spec,are "href" and "style" called "attribute"?....@@ Could someone good give me the...
33
2462
by: amerar | last post by:
Hi All, I can make a page using a style sheet, no problem there. However, if I make an email and send it out to my list, Yahoo & Hotmail totally ignore the style tags. It looks fine in...
5
17658
by: johnsuth | last post by:
I want to produce a trivial demonstration of dynamic modification. I thought that pressing a button might change its color. I studied O'Reillys books and successfully created the button with a...
18
2522
by: craig | last post by:
I am curious about how many of you prefer style 1 vs. style 2, and why. Are there names for these style? style 1: method { }
1
1301
by: RayS | last post by:
I've begun a Python module to provide a complete interface to the Meade LX200 command set, and have searched for a style/development guide for Python Lib/site-packages type modules, but only saw...
7
5424
by: Vincent Lefevre | last post by:
I'd like to generate something like that: <style type="text/css">/*<!]></style> I thought the following would work, but it doesn't (I tried with xsltproc). <?xml version="1.0"?> ...
3
1833
by: Henrik | last post by:
My web pages of course use css files, but Webmail services require style to be in element style attributes. How do I convert a standard HTML page to HTML suitable for delivery to webmail...
3
11699
by: Chandra | last post by:
Hi All, I have 2 htmls with one being referred in iframe of the other. The iframe html has style display = block and none set in the javascript. however this makes the block go behind the parent...
0
7134
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7180
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
6901
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7392
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5479
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4920
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3105
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3101
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
667
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.