Newsletter CSS

By Toledoh - October 18, 2012

Hi Guys,

Is there any way to include styles in the newsletters? I know that we are meant to use inline styles, and in the template I'm tying font sizes, colours etc into the <td>'s but is there any way to control elements that my client changes?

ie. They will be inserting links into the body of an email. I don't wan these links to show up blue as default... I want them white.

Any ideas?
Cheers,

Tim (toledoh.com.au)

Re: [Toledoh] Newsletter CSS

Hi,

There is a way to include a custom style sheet for the wysiwyg editor. If you go to the directory cmsAdmin/lib and create a file called wysiwyg_custom.css, then add what styles you want to appear in the editor. This will automatically replace the default wysiwyg.css when your carrying out editing.

These changes will only appear in the wysiswg editor, and will not appear on the live site or in any newsletters you send.

Do you want these changes to only appear within your newsletter wysiwyg editor? This is possible, but isn't so straight forward and will required editing of the CMS Builder code.

Thanks
Greg Thomas







PHP Programmer - interactivetools.com

Re: [greg] Newsletter CSS

By Toledoh - October 19, 2012

Hi Greg,

Because the email is going out to peoples email accounts, I cannot use an external stylesheet - all the font colors, sizes, background colors etc need to be inline css - which I've done via the template.

However, there's some styles things that I can't set up in the template, such as <a>... I need some form of global style.

I was wondering if I could set up something like this in the email - even though there's no <head></head>;

<style>
a{color:red; text-decoration:none;}
a:hover{color:yellow;}
</style>

Cheers,

Tim (toledoh.com.au)

Re: [Toledoh] Newsletter CSS

By Toledoh - October 21, 2012

Hi Guys,

having a play, I found that I can add style directly to newsletterBuilder.php at about line760.

Would it be possible to have a textbox in the settings that allows us to add styles?
Cheers,

Tim (toledoh.com.au)

Re: [Toledoh] Newsletter CSS

By Dave - October 21, 2012

>Would it be possible to have a textbox in the settings that allows us to add styles?

We're working on adding templates to newsletter builder, so we could break that out as a separate field, but the nice part about having it in the wysiwyg content is the wysiwyg content instantly reflects whatever the CSS specifies.
Dave Edis - Senior Developer
interactivetools.com