Inline Styles in SharePoint 2013

Adding inline styles into SharePoint 2013 Pages or Master Pages is a bit tricky as SharePoint will add a CDATA tag to make your code XML valid. Cause of this CDATA tag, the CSS might not work in every browser.

To prevent this, you have to form your inline styles the following way:

        <!–MS: <style type=”text/css”> –>
         <!–    .ms-cui-tts,
             .ms-cui-topBar2,
             #suiteBarButtons{
                 display:none;
             }
         –>
         <!–ME: </style> –>

Leave a Reply

Your email address will not be published. Required fields are marked *

*