Title: Prevent Inline CSS
Last modified: October 29, 2021

---

# Prevent Inline CSS

 *  Resolved [bengreytwo](https://wordpress.org/support/users/bengreytwo/)
 * (@bengreytwo)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/prevent-inline-css/)
 * Hi,
 * Maxbuttons always seems to display with inline CSS, even though the setting to
   put CSS into a file has been enabled.
 * Within the table on [https://goodmoneyguide.com/trading/](https://goodmoneyguide.com/trading/)
   you’ll see the “See Offer” buttons have the styles repeated above them.
 * I know in the past there were some issues with TablePress, and I’ve tried adding`
   cache_table_output=false` to the table in case this was the solution but no luck.
 * Any ideas?
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fprevent-inline-css%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Plugin Author [Bas Schuiling](https://wordpress.org/support/users/basszje/)
 * (@basszje)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/prevent-inline-css/#post-15035527)
 * Does the shortcode still have the style=”inline” attribute on it? That causes
   the style to display inline.
 *  Thread Starter [bengreytwo](https://wordpress.org/support/users/bengreytwo/)
 * (@bengreytwo)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/prevent-inline-css/#post-15035552)
 * Hi,
 * It does not.
 * For example, one tablepress cell has the contents of
    `[maxbutton id="1" url="
   https://goodmoneyguide.com/visit/ig-cfd/" text="See Offer" ]<br>Your capital 
   is at risk. 73% of retail CFD accounts lose money`
 * This outputs the following HTML
 *     ```
       <td class="column-5">
         <style type="text/css">
           .maxbutton-1.maxbutton.maxbutton-visit-broker {
             position: relative;
             text-decoration: none;
             display: inline-block;
             vertical-align: middle;
             width: 150px;
             height: 50px;
             border: 2px solid #1e73be;
             border-radius: 4px 4px 4px 4px;
             background-color: #1e73be;
             -webkit-box-shadow: 0px 0px 2px 0px #333333;
             -moz-box-shadow: 0px 0px 2px 0px #333333;
             box-shadow: 0px 0px 2px 0px #333333
           }
   
           .maxbutton-1.maxbutton.maxbutton-visit-broker:hover {
             border-color: #1e73be;
             background-color: white;
             -webkit-box-shadow: 0px 0px 2px 0px #333333;
             -moz-box-shadow: 0px 0px 2px 0px #333333;
             box-shadow: 0px 0px 2px 0px #333333
           }
   
           .maxbutton-1.maxbutton.maxbutton-visit-broker .mb-text {
             color: #ffffff;
             font-family: Tahoma;
             font-size: 16px;
             text-align: center;
             font-style: normal;
             font-weight: normal;
             line-height: 1em;
             box-sizing: border-box;
             display: block;
             background-color: unset;
             position: relative;
             padding: 18px 0px 0px 0px
           }
   
           .maxbutton-1.maxbutton.maxbutton-visit-broker:hover .mb-text {
             color: #1e73be
           }
   
           @media only screen and (min-width:0px) and (max-width:480px) {
             .maxbutton-1.maxbutton.maxbutton-visit-broker {
               width: 90%
             }
   
             .maxbutton-1.maxbutton.maxbutton-visit-broker .mb-text {
               font-size: 12px
             }
           }
         </style>
         <a class="maxbutton-1 maxbutton maxbutton-visit-broker thirstylink" target="_blank" rel="" href="https://goodmoneyguide.com/visit/ig-cfd/" title="IG CFDs" data-linkid="66020" data-nojs="false">
           <span class="mb-text">See Offer</span>
         </a>
         <br>Your capital is at risk. 73% of retail CFD accounts lose money
       </td>
       ```
   
 * And just to reiterate, `Use CSS file instead of inline output in footer` setting
   is enabled
 *  Plugin Author [Bas Schuiling](https://wordpress.org/support/users/basszje/)
 * (@basszje)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/prevent-inline-css/#post-15035656)
 * Do you have caching active? Maybe refresh them all and see if that changes anything.
 * The CSS-file setting ( which is a PRO only setting? ) is also not active. It 
   should add a `<link rel="stylesheet">` to the footer with this name: maxbuttons-
   front-css . I don’t see that being loaded either.
 * Perhaps try to add a button to a test page and see if that’s properly loaded 
   in the footer to rule out anything going wrong on that part.
 *  Thread Starter [bengreytwo](https://wordpress.org/support/users/bengreytwo/)
 * (@bengreytwo)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/prevent-inline-css/#post-15035694)
 * The site does have caching, but this has been cleared many times, and still is
   an issue without caching enabled.
 * Correct, this is the MaxButton Pro plugin.
 * This feature works on some pages, for example, [https://goodmoneyguide.com/cmc-markets/](https://goodmoneyguide.com/cmc-markets/).
   
   The bulk usage of this plugin is within TablePress where it seems to have an 
   issue.
 *  Plugin Author [Bas Schuiling](https://wordpress.org/support/users/basszje/)
 * (@basszje)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/prevent-inline-css/#post-15036934)
 * Hi again,
 * I digged into it and I’m very sorry but totally forgot that we implemented an
   automatic feature to add button inline automatically when the plugin detects 
   it’s inside TablePress.
 * You can turn it off by adding this snippet:
 * `add_filter('mb/integrations/auto_inline_tablepress', function () { return false;});`
 * When testing please note that TablePress **doesn’t** cache tables when the user
   is logged in, so also check in a browser without login.
 * When testing you can also remove the cached data from the database directly:
 * `delete from wp_options where option_name like '%transient_tablepress%'`
 *  Thread Starter [bengreytwo](https://wordpress.org/support/users/bengreytwo/)
 * (@bengreytwo)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/prevent-inline-css/#post-15037255)
 * Hey,
    No problem at all – thanks a lot. This works perfectly!
 * Appreciate your help.

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

The topic ‘Prevent Inline CSS’ is closed to new replies.

 * ![](https://ps.w.org/maxbuttons/assets/icon-128x128.png?rev=1378636)
 * [MaxButtons - Create buttons](https://wordpress.org/plugins/maxbuttons/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/maxbuttons/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/maxbuttons/)
 * [Active Topics](https://wordpress.org/support/plugin/maxbuttons/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/maxbuttons/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/maxbuttons/reviews/)

 * 6 replies
 * 2 participants
 * Last reply from: [bengreytwo](https://wordpress.org/support/users/bengreytwo/)
 * Last activity: [4 years, 7 months ago](https://wordpress.org/support/topic/prevent-inline-css/#post-15037255)
 * Status: resolved