CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMail (Moderator: Piotr Szotkowski) »
  • CSS in Head Tags
Pages: [1]

Author Topic: CSS in Head Tags  (Read 2954 times)

dhelsten

  • I’m new here
  • *
  • Posts: 6
  • Karma: 1
CSS in Head Tags
October 12, 2009, 05:21:37 pm
CiviMail seems to strip out the head tag of my html and all of the css in it.  Is this normal?

I'm new to using html in email and understand that it is more restrictive than for browsers.  I found templates at http://www.campaignmonitor.com/templates/ which say they are compatible with most clients however these templates use CSS in the head tag. 

Any suggestions on other email templates that are more compatible with CiviMail?  My users will need WYSIWYG from within CiviMail.


Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: CSS in Head Tags
October 12, 2009, 07:27:08 pm

that is not normal

civimail should not be touching any of the contents of the message. it does token replacements on the message and then attaches it as is

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: CSS in Head Tags
October 12, 2009, 08:04:18 pm
my experience is that if styling is put in the head tag then it gets dropped - hence doing all styling 'inline'
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: CSS in Head Tags
October 12, 2009, 08:25:50 pm

pete:

r u confirming that civimail drop the "head" tag / styling of the css? or email clients ignore it?

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: CSS in Head Tags
October 12, 2009, 08:36:22 pm
civimail drops head tag
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: CSS in Head Tags
October 13, 2009, 08:11:28 am

spoke with pete on IRC about this

to be more exact its the WYSIWYG editors that are potentially dropping the head tag. They basically hand civimail a chunk of html without the head tag

if you upload an html file to civimail wiht the head tag, that goes thru fine. You might want to check the docs on the WYSIWYG editors on how to do this

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMail (Moderator: Piotr Szotkowski) »
  • CSS in Head Tags

This forum was archived on 2017-11-26.