Hide Font Faces from the SharePoint Ribbon using CSS

As a follow up to the post Hide items from SharePoint Ribbon using CSS, here are a few more selectors to hide specific font faces from the font formatting options in the Ribbon.  I received a question from a SPTechCon Boston 2014 attendee about this and I have to say, I don’t blame the guy for not wanting to give his users 14 font face options for their content.  🙂 

This is a continuation of a previous post (Hide items from SharePoint Ribbon using CSS) so please check out that post first for more in-depth introduction information and how-to.

Hide font faces

The font face dropdown in the Ribbon provides two generic options, Body (theme font) and Heading (theme font). Next is 12 individual faces that vary from Calibri to Comic Sans to Times New Roman. Here are the CSS selectors to target in your custom CSS file to hide any one of these options:

Font face groups:
Theme Fonts: #msFontFamily-0
Fonts: #msFontFamily-1
(If you take away both Theme Fonts and Fonts, it is better to remove the entire font dropdown using #Ribbon\.EditingTools\.CPEditTab\.Font\.Fonts-Medium)
Font faces:
Body (theme font): #fseaFont-0-0-Menu
Heading (theme font): #fseaFont-0-1-Menu
Calibri: #fseaFont-1-0-Menu
Comic Sans: #fseaFont-1-1-Menu
Courier: #fseaFont-1-2-Menu
Garamond: #fseaFont-1-3-Menu
Georgia: #fseaFont-1-4-Menu
Impact: #fseaFont-1-5-Menu
Lucida Console: #fseaFont-1-6-Menu
Palatino Linotype: #fseaFont-1-7-Menu
Segoe UI: #fseaFont-1-8-Menu
Tahoma: #fseaFont-1-9-Menu
Times New Roman: #fseaFont-1-10-Menu
Trebuchet MS: #fseaFont-1-11-Menu

Example code:

/* Hide Comic Sans, Segoe UI and Tahoma from the Ribbon */
#fseaFont-1-9-Menu {
	display: none;

 Hide font sizes

You can apply the same technique to remove some of the font size options as well.

Font sizes:
9: #fseaFontSize-0-0-Menu
11: #fseaFontSize-0-1-Menu
13: #fseaFontSize-0-2-Menu
18: #fseaFontSize-0-3-Menu
24: #fseaFontSize-0-4-Menu
36: #fseaFontSize-0-5-Menu
48: #fseaFontSize-0-6-Menu
72: #fseaFontSize-0-7-Menu

Example code:

/* Hide font sizes 36, 48 and 72 from the Ribbon */
#fseaFontSize-0-7-Menu {
	display: none;

6 thoughts on “Hide Font Faces from the SharePoint Ribbon using CSS”

Leave a Reply to spexperience Cancel reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.