• Resolved mossbit

    (@mossbit)


    I am working in my child theme.
    I want to add a background color and change the font color to all my pages, but not the blogs.
    If I add a background and change my font color in the css

    .entry-header {
    	margin-bottom: 24px;
    	margin-bottom: 1.714285714rem;
    	color: #FFF;
    	background: #6F8763;
    }

    This changes the bg and the font color of the pages which is what I want, but it changes the posts as well.
    Any ideas how to change the the blogs back to not having a background color.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Look at the <body> tag on your webpage.
    There’s probably a class named “page” that you can use to identify the CSS only to apply to that template.

    Thread Starter mossbit

    (@mossbit)

    Thank you so much for your immediate response.
    I keep forgetting to use Firebug in Firefox. I need to tattoo this on my forehead.
    I ended up identifying the page through the body tag and added the class behind it and this worked for me.

    #post-7 .entry-title {
    	background: #6F866A;
    	color: #FFF;
    	padding: 10px;
    }

    I guess I will have to do this for every page.
    right?
    if it works can I assume I am doing the css properly?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘WordPress Twenty Twelve Theme different styling for page titles and post-titles’ is closed to new replies.