WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] [TwentyEleven] child theme's css not recognized (14 posts)

  1. jckmvmt
    Member
    Posted 2 years ago #

    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).

  2. cjc1867
    Member
    Posted 2 years ago #

    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.

  3. alchymyth
    Forum Moderator
    Posted 2 years ago #

    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 http://getfirebug.com/ might help you to investigate the styles of your site.

  4. jckmvmt
    Member
    Posted 2 years ago #

    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!)

  5. cjc1867
    Member
    Posted 2 years ago #

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

  6. jckmvmt
    Member
    Posted 2 years ago #

    alchymyth,
    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.

  7. jckmvmt
    Member
    Posted 2 years ago #

    cjc,
    that part was always a part of the style file.

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

  8. cjc1867
    Member
    Posted 2 years ago #

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

  9. jckmvmt
    Member
    Posted 2 years ago #

    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)

  10. jckmvmt
    Member
    Posted 2 years ago #

    (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

  11. cjc1867
    Member
    Posted 2 years ago #

    Sorry jckmvmt but back to square one...I've got the original problem back

  12. jckmvmt
    Member
    Posted 2 years ago #

    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

  13. cjc1867
    Member
    Posted 2 years ago #

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

  14. cjc1867
    Member
    Posted 2 years ago #

    it's back now leave it alone...lol

Topic Closed

This topic has been closed to new replies.

About this Topic