Support » Fixing WordPress » Child theme on localhost not overwritting style.css

  • On my localhost using xampp, I’ve made a child theme and it works when footer.php is edited however any edits made to style.css does not.

    I dont’ get it!? any suggestions? thanks

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

    (@anevins)

    Forum moderator

    Perhaps you need to add more specific selectors in your Child Theme stylesheet.

    how much more specific can selectors be? do you have an example?

    for instance i’m just trying to change the body’s background:

    body{
    background:#99000;
    }

    Moderator Andrew Nevins

    (@anevins)

    Forum moderator

    What I do is use a Browser Inspector Tool to find the current styles’ selectors, then use those same selectors in my Child Theme stylesheet.

    you’re right, there was a more specific selector:

    body.custom-background {}

    However it didn’t work.

    Custom background is likely set through an option in your theme.

    custom background is set through theme option however other css items are not changing either. for instance, an h2 tag or p tags are not overriding.

    Funny thing is, all the php files seem to be working, but not the css files.

    Moderator Andrew Nevins

    (@anevins)

    Forum moderator

    Try adding !important to your styles and use the most specific (as necessary) selectors, to make-sure whether your styles are overriding.

    Could it be theme related?

    The child theme that is giving me problems, stems from “Online Marketer” theme.

    I have a child them for “Responsive” and that one works w/ no issues.

    Moderator Andrew Nevins

    (@anevins)

    Forum moderator

    Yes, CSS issues are likely to be theme-specific.

    that’s too bad. Wonder why or how!? seems like there has to be a workaround for this.

    Moderator Andrew Nevins

    (@anevins)

    Forum moderator

    Your web browser may have cached your original stylesheet; try clearing your browser cache.

    It’s difficult to resolve CSS issues without perceiving them.

    I ended up choosing another theme.

    Although i’m saving the “online marketer” theme to play around w/ in a future time, hopefully finding a fix.

    thanks for all the help.

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Child theme on localhost not overwritting style.css’ is closed to new replies.