SharePoint CSS Tricks: Modify the Content Editor Web Part text

Ever wanted to change the style of the text within a Content Editor Web Part (CEWP)?  Add these custom styles to your style sheet:

CEWP paragraph formatting
div.ms-WPBody {}

CEWP H1 header formatting
div.ms-wpbody p h1, div.ms-wpbody h1 {}

CEWP H2 header formatting
div.ms-wpbody p h2, div.ms-wpbody h2 {}

CEWP H3 header formatting
div.ms-wpbody p h3, div.ms-wpbody h3 {}

CEWP unordered and ordered list formatting
div.ms-wpbody p ul, div.ms-wpbody ul {}
div.ms-wpbody p ol, div.ms-wpbody ol {}

CEWP links formatting
div.ms-wpbody a:link {}
div.ms-wpbody a:visited {}
div.ms-wpbody a:hover {}

UPDATE 9/12/05: Shane posts some additional info about this topic.

2 thoughts on “SharePoint CSS Tricks: Modify the Content Editor Web Part text”

  1. How to get the content of the Content editor web part ( in moss 2007) thru MOSS object model?Thanks in Advance,Paresh

Comments are closed.