WordPress.org

Support

Support » How-To and Troubleshooting » [Resolved] How to add background color on part of page contents?

[Resolved] How to add background color on part of page contents?

  • I tried to use Ultimate TinMCE to add backgound color for just a part of page contents, but I can’t. Only can add text highlight. Please advise how to add by Ultimate TinMCE or any other suggestions.

    Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Someone else may have an easier suggestion, but here’s what occurs to me. You can set up a shortcode that will do the trick either with inline css or by assigning a class to the relevant portion of the page contents and adding a background to the class in styles.css. Ultimate TinyMCE will display that item in the shortcode dropdown list (assuming, of course, that you’ve configured UTMCE to display the shortcode dropdown). Then you’d be able to select a chunk of text for which you want a different background and then choose the relevant shortcode from the dropdown to make the background appear. A good explanation of how to set up a shortcode appears here:

    http://wp.smashingmagazine.com/2012/05/01/wordpress-shortcodes-complete-guide/

    WPyogi

    @wpyogi

    Forum Moderator

    You can easily do that using CSS and ID or class attributes in the part of the page you want to change the color of. If you want more specific help, post a link to your site.

    Resolved by following codes. It is much easier. I’m a baby. Thank you so much WPyogi and creekdweller.
    <head>
    <style type=”text/css”>
    p
    {
    background-color:#FFFFE0;
    }
    </style>
    </head>

    <body>
    <p>
    Text here.
    </p>
    </body>

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Resolved] How to add background color on part of page contents?’ is closed to new replies.