• Hello everyone,

    I have created a child theme from Twenty Twelve and after changing the background color for the whole website to black, I am trying to change the color of the title from black to something else, but I failed so far.

    This is what I see in the theme:

    media="all"
    .site-header h1 a, .site-header h2 a {
    color: #515151;
    display: inline-block;
    text-decoration: none;
    }
    .site-title a, .site-description {
    color: #000000 !important;

    The line color: #515151; actually appears to be crossed, so when I tried to change the color code in the CSS for my child theme it was obviously to now avail. However, I had no results also when I tried to change the latter color code, from #000000 to something else. I did try to delete the cache but nothing changed. I don’t really know what I’m doing wrong. Thanks for your help.

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

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Where is this style:

    .site-title a, .site-description {
     color: #000000 !important;

    Coming from? It doesn’t look like it’s from the original stylesheet.

    Thread Starter davm

    (@davm)

    I’m not sure. It is not in the original stylesheet, as you say and I did not touch that.
    This is what the stylesheet for my child theme looks like:

    /*
    
    Theme Name: Child of Twenty Twelve
    Description: Test child theme based on Twenty Twelve
    Author: Davide
    Version: 0.0.1
    Template: twentytwelve
    
    */
    
    @import url('../twentytwelve/style.css');
    
    /* 
    
    Change site background color to black
    
    */
    
    .site {
    padding: 0 24px;
    padding: 0 1.714285714rem;
    background-color: rgb(0, 0, 0);
    }

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Can you try deactivating plugins to explore whether any are responsible?
    Can you also link the site/webpage in question?

    Thread Starter davm

    (@davm)

    The only activated plugin I have is YARPP, but the same problem occurred before I installed and activated it.
    I don’t think I can link the website as I’m working on it as a localhost with MAMP. Here’s a scan of what the page looks like with a red circle where the title is (although invisible, due to the black background):
    http://www.dropbox.com/s/y0c2q1r1fdwsfx6/site.tiff

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Did you edit the header.php file? It looks as though the !important style is coming directly from the <head> section of the webpage.

    Thread Starter davm

    (@davm)

    Yes, but all I did was copy this:

    <?php $header_image = get_header_image();
    		if ( ! empty( $header_image ) ) : ?>
    			<a href="<?php echo esc_url( home_url( '/' ) ); ?>"><img src="<?php echo esc_url( $header_image ); ?>" class="header-image" width="<?php echo get_custom_header()->width; ?>" height="<?php echo get_custom_header()->height; ?>" alt="" /></a>
    		<?php endif; ?>

    And paste it a few lines up, in order to get my header image on top of the main website title.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘TwentyTwelve child theme – Change main title color’ is closed to new replies.