Support » Fixing WordPress » Cannot Add CSS To My Child Theme

  • Resolved sclowes14

    (@sclowes14)


    Hi All!

    So here is my dilemma..

    I am attempting to create a child theme for Twenty Twelve. I have successfully created and activated my child theme. I have also successfully imported the Twenty Twelve parent style sheet. Here is the code:

    /*
    
    Theme Name: Son of Twenty Twelve
    Description: Child theme based on the default WordPress Twenty Twelve.
    Author: Stephen Clowes
    Version: 0.0.1
    Template: twentytwelve
    
    */
    
    @import url('../twentytwelve/style.css')

    Here is where it gets interesting. Whenever I attempt to add any CSS to override the parent style sheet, not only does it not work, it takes away the entire theme (it goes back to simple html). For example:

    /*
    
    Theme Name: Son of Twenty Twelve
    Description: Child theme based on the default WordPress Twenty Twelve.
    Author: Stephen Clowes
    Version: 0.0.1
    Template: twentytwelve
    
    */
    
    @import url('../twentytwelve/style.css')
    
    a{
    	color: #ff43s5;
    }

    I am so confused.. The import works successfully and chrome dev tools is showing no broken connection to the style sheet, but the theme completely disappears. I hope this does a good job explaining it. I am new to WordPress and PHP, but I know my HTML and CSS. WordPress community please reach out and guide me to the light! Sorry I have got a host yet for my site.

Viewing 2 replies - 1 through 2 (of 2 total)
  • WPyogi

    (@wpyogi)

    Forum Moderator

    You are missing a semi-colon at the end of this line:

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

    sclowes14

    (@sclowes14)

    Wow.. So simple yet so easy to miss. Worked perfectly thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Cannot Add CSS To My Child Theme’ is closed to new replies.