Tuesday, May 14, 2013

Re: CSS in CakeEmail

On 14 May 2013, at 06:38, Jason Ellis wrote:

> In my CakePHP website I have added my css file to app/View/Layouts/default.ctp
> $this->Html->css('myapp');
>
> I use this to add colors to rows in tables on my website.
>
> I have a controller which sends a weekly email to staff with the contents of a table on my website.
>
> My problem is the table in the email does not have colors. Is there any way I can have my CSS applied to my CakeEmail in the same way it is applied to pages on the website?

you cant serve an external style sheet to email messages as email doesnt behave like html pages.

you'll have to add inline styles to elements to get them to change accordingly.

http://css-tricks.com/sending-nice-html-email-with-php/

HTH

....................................
Mike Karthäuser
Director, Brightstorm Ltd.

1, Brewery Court
North Street
Bristol
BS3 1JS

mikek@brightstorm.co.uk
www.brightstorm.co.uk
+44(0) 7939252144
....................................









--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.

No comments: