2

I added a content editor webpart in my sharepoint page. By default it is using 'Verdan' font type. How would I change it to 'Arial' ?

3 Answers 3

1

Actual class name to overwrite is ms-WPBody

0

The default font settings for the body of a content editor web part are controlled by the

.ms-rte-wpbox

style in the corev4.css file. To change it you will need to override that style with your own CSS

3
  • I tried same like you sugested, but did not get the result. in my custom CSS. in CSS I added .ms-rte-wpbox{ font-family: Arial; Font Size: 10px} in designer i added as <SharePoint:CssRegistration Name="CSS Path" After="corev4.css" runat="server"></SharePoint:CssRegistration> ... but still not getting the result.. anything I missed
    – Srikanth
    Commented Mar 29, 2012 at 9:42
  • 1
    @ Deep Nair - the class name you suggested was a WRONG ONE and ate a lot of my time.
    – Srikanth
    Commented Mar 29, 2012 at 13:12
  • I apologize for the delay in response. The ms-WPBody would apply styling for any web part in the site. But the class .ms-rte-wpbox should be good enough to change the font style for only rich text boxes.
    – Deepu Nair
    Commented Mar 30, 2012 at 16:08
0

Changing the Default Text Style in the Content Editor

This will change the default font size in the wiki editor on a publishing site.

.ms-wikicontent, .ms-wikicontent p, 
.ms-rtestate-field, .ms-rtestate-field p,
.ms-rte-layoutszone-inner-editable, .ms-rte-layoutszone-inner-editable p, 
.ms-rtestate-write, .ms-rtestate-write p{
    font-size: 10pt;
    font-family: Verdana,Geneva,sans-serif;
    color: gray;
}

And if you want to change the default style for hyperlinks:

.ms-wikicontent a, 
.ms-rtestate-field a,
.ms-rtestate-write a,
.ms-rte-layoutszone-inner-editable a{
    color:#2572BC;
    text-decoration: none;
}
.ms-wikicontent a:hover, 
.ms-rtestate-write a:hover,
.ms-rtestate-field a:hover,
.ms-rte-layoutszone-inner-editable a:hover{
    color:#F37B00!important;
    text-decoration: none;
}

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.