Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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?

share|improve this question

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.

share|improve this answer
    
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 '13 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 '13 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 '13 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 '13 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 '13 at 11:52

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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