Send A Message

If you have a question or comment, drop me a line and I'll be
sure to get back to you. I'm always available to answer any
questions you have regarding your website.

Full Name

Email Address

What can I help you with?


Force a Background Color in TinyMCE

December 18, 2008 at 12:39 pm | CSS | 1 comment

So you’ve put together a CSS template with a body background color. We’ll use #4C4C4C. Your CSS template contains a content area that is a different color. We’ll use #000000. In simple form that looks like this:

body {
    background-color: #4C4C4C;
}
#content {
    width: 700px;
    margin: 0 auto;
    background-color:#000000;
    color: #FFFFFF;
}

Now if your content area is black, wouldn’t it be nice to edit your content in TinyMCE on a black background? Assuming you have TinyMCE importing your sites stylesheet, here is the trick:

* .mceContentBody {
    background: #000000;
}

That’s it!  Super easy.  If you have a better way of doing this feel free to comment.

One Response to Force a Background Color in TinyMCE

  1. Aimee says:

    Thank you! Very simple solution to this problem.

Leave a Reply

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

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Spam protection by WP Captcha-Free