Title: Stripping inline css attributes
Last modified: May 4, 2017

---

# Stripping inline css attributes

 *  Resolved [springthistle](https://wordpress.org/support/users/springthistle/)
 * (@springthistle)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/stripping-inline-css-attributes/)
 * This plugin looks great, but has a major problem which is that it strips out 
   inline css attributes from my site. I have a number of elements on the site that
   have background images specified inline.
 * For example, this:
    `<div class="background-image-holder fadeIn" style="background-
   image: url(&quot;https://citibabes.com/wp-content/uploads/2015/07/Home-City-Bitty-
   1045x745.jpg&quot;); background-position: initial;">`
 * Is transformed into this:
    `<div class="background-image-holder fadeIn">`
 * So it’s completely blank. I tried turning off “minify css” and “combine css” 
   but that didn’t help.
 * Can you make an option to NOT strip out inline css attributes?

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Author [launchinteractive](https://wordpress.org/support/users/launchinteractive/)
 * (@launchinteractive)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/stripping-inline-css-attributes/#post-9099249)
 * Hi springthistle,
 * I don’t think MMR is causing the style tag to be stripped. MMR doesn’t edit any
   inline css. It looks like your style attributes are being adding with javascript.
 * What I think is happening is your javascript compilation is failing and then 
   the script is never running to add the attributes.
 * When you enable MMR do you have any Javascript errors in the logs? Perhaps try
   turning off minify js and combine js to determine the bad script.
 *  Plugin Author [launchinteractive](https://wordpress.org/support/users/launchinteractive/)
 * (@launchinteractive)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/stripping-inline-css-attributes/#post-9100374)
 * Also, please try 1.8.3 as it fixed an error that might be causing your javascript
   to fail.
 *  Thread Starter [springthistle](https://wordpress.org/support/users/springthistle/)
 * (@springthistle)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/stripping-inline-css-attributes/#post-9109516)
 * Hi Launch, thanks for replying so quickly.
 * My inline styles are not added with Javascript, so that couldn’t explain the 
   problem. However, after I updated the plugin and re-activated it, it’s working
   without problems, so I’m all set now. Many thanks!
 *  Plugin Author [launchinteractive](https://wordpress.org/support/users/launchinteractive/)
 * (@launchinteractive)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/stripping-inline-css-attributes/#post-9110349)
 * Great!

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Stripping inline css attributes’ is closed to new replies.

 * ![](https://ps.w.org/merge-minify-refresh/assets/icon.svg?rev=3414776)
 * [Merge + Minify + Refresh](https://wordpress.org/plugins/merge-minify-refresh/)
 * [Support Threads](https://wordpress.org/support/plugin/merge-minify-refresh/)
 * [Active Topics](https://wordpress.org/support/plugin/merge-minify-refresh/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/merge-minify-refresh/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/merge-minify-refresh/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [launchinteractive](https://wordpress.org/support/users/launchinteractive/)
 * Last activity: [9 years, 1 month ago](https://wordpress.org/support/topic/stripping-inline-css-attributes/#post-9110349)
 * Status: resolved