WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Child theme , twenty twelve (9 posts)

  1. Grithify
    Member
    Posted 1 year ago #

    Hi
    I have searched the forum and found a lot of issues similar to mine, but I haven't found the solution yet :-/

    I can't get my child theme to work.

    I have made the file style.css and put in a folder here /public_html/wp-content/themes/rabattheme

    The file contains this:
    /*
    Theme Name:rabattheme
    Version: 1.0
    Description: A child theme for Twenty Twelve
    Author: Grith Hodal
    Template: twentytwelve
    */

    @import url('../twentytwelve/style.css');

    h1.site-title a {
    color: #ff0000;
    }

    body {
    background: #ff0000;
    }

    You can see the site here: http://rabatkoder-nu.dk/

    Does anyone knows where the problem is?
    Thanks

  2. esmi
    Forum Moderator
    Posted 1 year ago #

    You cannot see your red body background becuase of the background image you already have on the site. Also, you have configured your site to show you site title in yellow via Appearance -> Header which will take precedence over your theme's site-title CSS.

  3. Grithify
    Member
    Posted 1 year ago #

    Thanks :-)
    The backgroundimage was there for a few seconds. There is no background image now, but the background color doesn't change to red... ?

  4. Andrew
    Forum Moderator
    Posted 1 year ago #

    You're probably not using specific-enough selectors...
    Try using;

    body.custom-background
  5. esmi
    Forum Moderator
    Posted 1 year ago #

    Have you also changed the body background color via Appearance -> Background? Again, this will take precedence over your theme's CSS.

  6. Grithify
    Member
    Posted 1 year ago #

    Thanks for your replies...

    No, I didn't change the background in Appearance. But now I have tried to remove the pre-defined the grey color. The background is now white and not red.

    I have also tried to use:
    body.custom-background {
    background: #ff0000;
    }

    No red background :-/

  7. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    Does it not work to use the custom background setting under
    Appearance > Background?

  8. Grithify
    Member
    Posted 1 year ago #

    Yes it works. But I was trying to have the child theme to work. It's not the red background, but a funtional child theme I need :-)

    But it works with color of the titles.

    Thanks for your help

  9. paulwpxp
    Font hero
    Posted 1 year ago #

    Try this

    html body,
    html > body.custom-background,
    body.custom-background-empty {
    	background-color:red;
    }

Topic Closed

This topic has been closed to new replies.

About this Topic