You are here: Re: Style with HTML mail « PHP Programming Language « IT news, forums, messages
Re: Style with HTML mail

Posted by Tim Roberts on 11/06/05 02:42

Frédéric Vailleau <fvailleau@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, timr@probo.com
Providenza & Boekelheide, Inc.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация