More in this section
Categories
Bloggers
Blogs RSS feed

Restyling the Comments box (RadEditor) throughout Sitefinity

by User Not Found

While working on a sample web site I noticed my comments textbox was inheriting a gray background from my web site’s BODY styles.

Comments box inheriting background color from body

After playing around with Firebug (which hopefully you’re using) I noticed this style was being inherited from the BODY styling that I had in my Theme.

Firebug showing inherited style for Sitefinity Comments box

By default, Sitefinity is picking up my Theme styling and applying it to RadEditor.  This might be fine, unless you’re utilizing a background-color that shouldn’t be applied to RadEditor.  So how can this be fixed?

Configuring new styles for RadEditor

The CSS applied to Sitefinity is configured in Sitefinity’s Settings section.  This setting can be found at in Advanced and Appearance.  The property you’re looking for is called EditorContentAreaCssFile.

Setting the RadEditor styles in Sitefinity

To apply new styles to RadEditor, simply point Sitefinity to a new CSS file.  From there, you’ll need to create that CSS file in your web site.  Here is an example.

/* These styles are used for styling RadEditor and are only applied when RadEditor is used on the page */
/* This style is referenced in Sitefinity's configuration in the Appearance area */

body 
{
    background-color: White !important;
}


As demonstrated above, you might need to utilize the !important attribute to styles inherited from your other theme.  Using these styles you should be able to style RadEditor however you might wish.

8 comments

Leave a comment
  1. Steve Jan 21, 2011
    Perfect!

    I was wondering where the toolsfile.xml could be specified too
  2. Davide Vernole Feb 04, 2011
    Very Useful
  3. waseem Jun 22, 2012
    Thanks for !important

    When you need to apply Css for RadEditor, you need to add !important after every attribute.
  4. sinthia Mar 29, 2015
    very usefull
  5. roblox hack Jun 23, 2018
    This feature is exactly what maintains Roblox fascinating to play after hours and hrs of playing <a href="http://robloxfreerobuxgenerator.com/">robux hack</a>  Nonetheless, if you still don't think us, you could constantly inspect our roblox hack with any software you desire.
  6. risk Jun 23, 2018
    The wonderful and classic website.visit to playrisk.online live.full information here <a href="http://playrisk.online/">game risk online</a>
     online the risk is a strategy board game of diplomacy, conflict and conquest for two to six players wonderful and exciting to explore.thanks for a sharing it.
  7. pinochle Jun 23, 2018
    If you want the best interesting card play the online latest most amazing game <a href="http://pinochle.online/">pinochle card games</a> for he players get free online have the fun fun forever so share the site with your friends thanks.
  8. bloons tower Jun 23, 2018
    Its all time entertaining game and you will play this game with full freedom as you should try to play this game <a href="http://bloonstd5.online/">tower bloons defense 5</a>  this maximum played game many person can play it same on time to enjoyed it.

    Leave a comment