Support » Themes and Templates » [TwentyEleven] child theme's css not recognized

  • Resolved jckmvmt


    I’m changing the header section of twentyeleven, specifically the #branding portion of style.css. It’s part of an overall effort to migrate from my normal html/css website into wordpress, which had a blue-themed image centered on the header with a background color matching the blue.

    my problem is that my child’s style.css for #branding is being completely ignored, showing only the nav bar in the final result (the website). Here’s the #branding CSS in my child’s style.css:

    #branding {
    	width: 100%;
    	height: 160px !important;
    	display: block;
    	background: url('images/11.png') !important;
    	background-repeat: no-repeat !important;
    	background-position: center !important;
    	background-color: #274379 !important;

    note: I edited my header.php file to completely get rid of hgroup and rewrite the header and nav tags into divs (while retaining the same ID names).

Viewing 13 replies - 1 through 13 (of 13 total)
  • Your style sheet link is not right on the page.

    you have @import within <style>

    the @import part should go into your child theme’s style sheet.



    Forum Moderator

    disable the ‘pagespeed’ plugin or whatever is causing style.css of the child theme to look like:

    @import url(../twentyeleven/style.css) ;#page{max-width:100%}#branding hgroup{margin:0 7.6%;background:url(images/x11.png.pagespeed.ic.3jkMFrLZqy.png)}

    using a tool such as Firebug might help you to investigate the styles of your site.

    Do you mean this part (which I left out of the code on my original post)?:

    Theme Name: Twentyeleven Child
    Description: Child theme for the twentyeleven theme
    Author: asd
    Template: twentyeleven
    @import url("../twentyeleven/style.css");

    There have been times when this stylesheet has affected the website (never in my favor, though!)

    That is right what you have got there, so put that line back in there and we can then see what is happening.

    thank you. I use Dreamhost, and there are a few free services it offers that are said to speed up the page (CloudFare, i think, and then something Google dev’d to speed up pages). I’ll try disabling them.

    that part was always a part of the style file.

    Or did I miss what you meant by “you have @import within <style>”?

    It looked like you mixed that bit up, I didn’t know pagespeed would make it look like that?

    damn, alchymyth. that’s incredible. pagespeed was the issue. it works now! I should report that to Google as a bug (they dev’d pagespeed. what’s weird is that twentyeleven worked just fine with pagespeed, but my child theme doesn’t.)

    incredible job (and thank you, too, cjc)

    (I’d like to add here, just in case, an alternative to disabling Pagespeed)

    insert the following into your site’s .htaccess file:
    ModPagespeedDisableFilters rewrite_images

    Sorry jckmvmt but back to square one…I’ve got the original problem back

    yes, I reloaded pagespeed.

    my issue now is that I can’t find my .htaccess file. is this something common for WordPress users? do I just need to make my own?

    EDIT: made my own. it doesn’t work, though

    What was in the original .htacess and what did you put in yours?

    it’s back now leave it alone…lol

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘[TwentyEleven] child theme's css not recognized’ is closed to new replies.