I deployed some custom CSS tags into HtmlEditorCustomStyles.css in the 14 hive, and would have expected them to appear under the Styles drop-down for a Content Editor web part.

I've researched this, and found that they need to be prefixed with -ms-rteStyles if using the HtmlEditorCustomStyles but this didn't work either.

I also had a look at the RichTextEditor tag in my page layout to ensure that the ms-rteStyles are tagged and all looks fine.

I even did a hard reset of my environment, as a IISReset didn't do anything.

Can it honestly be this difficult to assign custom styles to SharePoint?

  • did you find a solution for this? I've been struggling a lot with the same issue
    – RealSteel
    Apr 21, 2018 at 9:41

1 Answer 1


Why do you deploy custom CSS on the server? You can store custom CSS in the site collection Style library and then reference them in the master page. That has so far worked without problems in situations where the developer has no access to the 14 hive.

Changing the OOB server files is not a good idea, since you don't know if these get overwritten by a service pack or other updates. Keeping custom CSS in the site collection is also much more versatile, since you can have different custom styles per site collection.

In a publishing site, you can also set the location of a custom CSS file without even changing the master page: Site Settings > Master page > Custom CSS file.

  • Hi Teylyn, thanks for the response, but this is not a site specific CSS file, what I'm referring to is the custom css tags you add to the "Styles" action in the Ribbon. So when I click inside a CEWP, and select "Styles", I want to see my own custom tags pull through.
    – JadedEric
    Feb 3, 2013 at 18:40
  • I'm aware of that. ms-rte styles can be defined in custom CSS files that live in the Style Libray. Have you tried it?
    – teylyn
    Feb 3, 2013 at 23:31
  • I did, still didn't work. I thought it might've been some caching issue, so ensure that I got rid of the BLOB Cache on the front-ends and did an IISReset /Restart again, still nothing. I'm under the impression this only works certain scenarios?
    – JadedEric
    Feb 4, 2013 at 3:27
  • So, how did you reference the CSS file? Does it show up in the developer tools in IE? If not, check the method of referencing and the path.
    – teylyn
    Feb 4, 2013 at 9:18
  • That's the thing, every things coming up as expected, except the custom styles do not pull through ?:. I've looked at all the usual things, caching, non-existent CSS files, correct path in the Style Library, but nothing, still does not appear. I did however got it to work in a brand new SharePoint web application.
    – JadedEric
    Feb 4, 2013 at 11:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.