CSS not loading chnages in eleven40 theme

Community Forums Forums Design Tips and Tricks CSS not loading chnages in eleven40 theme

This topic is: resolved

This topic contains 4 replies, has 2 voices, and was last updated by  David Chu 1 year ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #62629

    mikemahony
    Participant
    Post count: 7

    Hi,

    I am working on the American Youth Hockey site for a friend. All of a sudden there is a problem with the CSS loading. I add a NEW rule and the rule never loads. If I load the CSS file in a browser window the rule is there, it just never gets applied to the part of the DOM I have assigned for it. An example: Go to the site and then click on Mom to Mom. I tried to add a class “cat-blurb” to that area and then style it with:

    .cat-blurb{
         padding-top: 15px;
    }

    I could “inspect element” in Chrome and see the “class=’cat-blurb’” in the DOM but the corresponding CSS did not show up on the right and the padding was not applied. I had to overcome this by adding the style inline on the element, not something I like to do because there are 8 elements using the same style which means changing anything requires 8 edits.

    I have noticed that if the rule pre-existed I can make changes and have them apply properly. I am using the child theme’s style.css file for all my changes. Does anyone have any ideas on why this would be happening?

    Thanks!

    Mike

    • This topic was modified 1 year ago by  mikemahony. Reason: Check "notify me" checkbox
    • This topic was modified 1 year ago by  mikemahony. Reason: Check "notify me" checkbox
    #62639

    David Chu
    Participant
    Post count: 1362

    You spelled important incorrectly, and I hate to say it, but the title of this post.

    Sorry, I couldn’t resist the straight line. :-)


    Dave Chu · Custom WordPress Developer – likes collaborating with Designers

    #62640

    mikemahony
    Participant
    Post count: 7

    Indeed I spelled important wrong (so much for my eyesight) but that was added AFTER I noticed the problem in an effort to see if the problem would go away. Just for fun, I corrected the word important AND added “padding-top: 50px” to the same style, refreshed the page and indeed that style is NOT applied and NOT showing when I inspect the element. Any idea why?

    #62642

    mikemahony
    Participant
    Post count: 7

    Thanks to you pointing out the typo I went and ran my page through the W3C CSS validator and found that I had forgotten to close a comment so that was causing the problem. I fixed that and everything works again. Thanks for your help!

    #62643

    David Chu
    Participant
    Post count: 1362

    Good deal!
    That’s a good rule of thumb: whenever seeing something unusually bizarre, go with HTML and/or CSS validation.

    Dave


    Dave Chu · Custom WordPress Developer – likes collaborating with Designers

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.