Title: Inline CSS doesnt work. Any solutions?
Last modified: April 19, 2017

---

# Inline CSS doesnt work. Any solutions?

 *  Resolved [birol089](https://wordpress.org/support/users/birol089/)
 * (@birol089)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/inline-css-doesnt-work-any-solutions/)
 * Hi,
 * first of all, you have created a very usefully plugin. Thanks for that! I would
   recommend it anytime.
 * I am creating a wp-site that should receive user generated content. I use a part
   of bbPress for user-profile management.
    I am using your plugin to notify user
   if their post receive us, if their post are accepted and/or if their post are
   aborted/deleted. Until now, its working perfect.
 * I am beginner at development-languages.
 * Now to my question.
    I have styled the notifications over the editor in wp with
   following method, wich working well.
 * example:
 *     ```
       <div class="example" style="margin-top: -5px; color: #252525; font-size: 16px; line-height: 25px;">
       <p>Example text</p>
       ```
   
 * But gmail and other big mail services ignores style commands. their accept the
   following method:
 * example:
 *     ```
       <html>
         <head>
           <style>
             .example {
               margin-top: -5px;
             }
             #body {
               font-size: 14px;
           </style>
         </head>
         <body>
           <div id='body'>
             <p>....</p>
             </div>
         </body>
       </html>
       ```
   
 * but if i use
 * `{ }`
 * your plugin skip this.
 * I have search the “Template”-files in your plugin to hardcoding this, but i dont
   find it 🙂 – is this in generall possible? if not, can you provide me a another
   solution?
 * thanks in advance
    greetings birol

Viewing 1 replies (of 1 total)

 *  Plugin Author [Kuba Mikita](https://wordpress.org/support/users/kubitomakita/)
 * (@kubitomakita)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/inline-css-doesnt-work-any-solutions/#post-9046181)
 * Hi Birol!
 * That’s interesting. You say that if you style the merge tag with inline styles
   it’s stripped?
 * I mean something like this:
 * `<span style="margin-top: -5px; color: #252525; font-size: 16px; line-height:
   25px;">{your_merge_tag}</span>`
 * I think it should work with the WP, Notification shouldn’t skip the styles. But
   I’m not sure if Gmail or other email client will.
 * Generally it’s not possible to hardcode the styles in the template, but using
   the filter might be an idea. Depends on your needs 🙂
 * Please check this filter: [https://github.com/Kubitomakita/Notification/blob/dev/inc/Notification.php#L209](https://github.com/Kubitomakita/Notification/blob/dev/inc/Notification.php#L209)
   or the one before.
 * [Filters reference](https://pippinsplugins.com/a-quick-introduction-to-using-filters/).

Viewing 1 replies (of 1 total)

The topic ‘Inline CSS doesnt work. Any solutions?’ is closed to new replies.

 * ![](https://ps.w.org/notification/assets/icon-256x256.gif?rev=3476901)
 * [Notification - Custom Notifications and Alerts for WordPress](https://wordpress.org/plugins/notification/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/notification/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/notification/)
 * [Active Topics](https://wordpress.org/support/plugin/notification/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/notification/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/notification/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Kuba Mikita](https://wordpress.org/support/users/kubitomakita/)
 * Last activity: [9 years, 1 month ago](https://wordpress.org/support/topic/inline-css-doesnt-work-any-solutions/#post-9046181)
 * Status: resolved