Plugins Plugin hub Backup SEO Caching Security Forms WooCommerce Images Best backup plugins
Hosting Hosting directory Shared hosting Managed WordPress Cloud hosting VPS hosting By reader location Hosting finder
Themes & builders Compare Rank Math vs Yoast
Tools All tools Hosting finder Plugin stack builder Cost calculator Salt generator Theme detector Who is hosting this? Speed test Headline analyzer robots.txt generator Redirect generator Uptime calculator Blog name generator
Blog Best backup plugins Deals
Guides All guides Speed up WordPress Choose hosting Back up WordPress
How we test

Troubleshooting

WordPress Child Theme style.css Not Working? Causes and Fixes

WordPress Child Theme style.css Not Working? Causes and Fixes

Short answer

A WordPress child theme stylesheet usually fails because it is never enqueued, loads before the parent styles, has a wrong Template line in its header, or is overridden by more specific CSS. Cached copies of the old file are the other big cause. Check whether the file loads in your browser's developer tools first, then fix enqueueing, load order, specificity or caching.

Key takeaways

  • First check in developer tools whether the child stylesheet loads at all.
  • The Template line must match the parent theme's folder name exactly.
  • Many parent themes do not load the child stylesheet automatically, so enqueue it.
  • Load the child styles after the parent and give them a changing version number.
  • Specificity, page builder CSS and caching often hide changes that did load.

Why is my child theme style.css not working?

The child stylesheet either is not loading at all, loads before the parent styles, or loads correctly but is overridden by more specific rules or hidden by a cached copy.

Those are different problems with different fixes. Spend two minutes finding out which one you have before editing any code.

What you seeLikely causeFix
File missing in Network tabNot enqueued or wrong headerEnqueue it and check the header
File loads, rules crossed outSpecificity or load orderLoad after parent, raise specificity
Old version of file loadsBrowser, plugin or CDN cacheVersion number and clear caches
Works logged in, not logged outPage cachePurge cache
Elementor pages ignore itElementor CSS winsMatch selectors, regenerate CSS

If you are new to how parent and child themes relate, our explainer on what a child theme is covers the basics first.

How do you check whether the stylesheet loads?

Open your site, press F12 to open developer tools, reload with the Network tab open, filter by CSS and look for your child theme's file and its status code.

A 200 status means the browser received it. A 404 means the path is wrong, and no entry at all means WordPress never added it to the page.

Next, inspect an element you styled. The Styles panel shows which rules apply and which are crossed out because another rule wins.

MDN's guide to CSS specificity explains why one rule beats another, which is the key to reading that panel.

Is the child theme header correct?

The stylesheet must start with a comment header containing a Theme Name and a Template line, and the Template value must exactly match the parent theme's folder name, not its display name.

For example, a child of Twenty Twenty-Four uses the folder name in lower case. A wrong value makes WordPress treat the child as broken or as a standalone theme.

Go to Appearance > Themes. If WordPress reports the parent theme as missing, fix the Template value first.

The WordPress Theme Handbook page on child themes shows a correct header and folder structure.

How do you enqueue the child stylesheet properly?

Add a function in the child theme's functions.php that enqueues the child stylesheet on the wp_enqueue_scripts hook, with the parent's style handle as a dependency so it loads afterwards.

The old method of using an @import line inside the stylesheet is no longer recommended. It is slower and can load files in an order you do not expect.

Here is a typical pattern:

add_action( 'wp_enqueue_scripts', function () {
    wp_enqueue_style(
        'child-style',
        get_stylesheet_uri(),
        array( 'parent-style-handle' ),
        wp_get_theme()->get( 'Version' )
    );
} );

Replace the parent handle with the real one. You can find it in the parent's functions.php or in the id attribute of its link tag in the page source.

If the parent theme already loads the active theme's stylesheet itself, you may see your file twice. In that case, only enqueue the parent stylesheet and let the parent load yours.

After saving functions.php, reload the site. A white screen or error here usually means a missing semicolon or bracket, so keep FTP or file manager access ready before editing.

The reference for wp_enqueue_style explains each argument, including dependencies and the version number.

Do block themes load the child stylesheet automatically?

Not always. Many block themes do not enqueue the child stylesheet by default, so either enqueue it as above or put style changes in the child's theme.json and Site Editor instead.

Why are my CSS rules being overridden?

The parent theme or a plugin uses more specific selectors, loads later, or uses !important, so its rules win even though your stylesheet loaded correctly.

Copy the exact selector the parent uses from developer tools, then write your rule with the same or slightly higher specificity.

Media queries matter too. A rule inside a parent media query can override your general rule on mobile only, which looks like the stylesheet randomly failing.

Avoid scattering !important everywhere. It fixes one rule today and makes the next change harder.

Inline styles from the Customizer, Site Editor or block settings also beat most stylesheet rules. Change those settings in the editor instead of fighting them in CSS.

How do caches stop CSS changes from showing?

Browsers, caching plugins, server caches and CDNs can keep serving the old stylesheet, so your edits look ignored until every layer serves the new file.

Add a version number that changes whenever the file changes. Bump the Version in the header, or use the file's modification time as the version.

Then clear your caching plugin, server cache and CDN. Our guide on how to clear cache in WordPress lists each layer.

The web.dev guide to HTTP caching explains why changing the file URL is the reliable way to bust a browser cache.

Our general guide to CSS changes not showing covers more cache and minification cases.

Why does Hello Elementor child theme CSS not work?

Elementor writes its own CSS files with specific selectors, so child theme rules often lose unless they load after Elementor and target the same selectors, and Elementor's CSS may need regenerating.

Elementor's official Hello child theme enqueues the child stylesheet with the Hello theme style as a dependency. Start from that pattern rather than writing your own from scratch.

After changes, use Elementor's tools to regenerate CSS and data files, then clear caches.

For page-specific styling, Elementor's own custom CSS options can be easier. Use the child theme for site-wide rules you want to keep under version control.

Our guide on using Elementor in WordPress explains where global styles and kits live.

Can optimisation plugins break child theme CSS?

Yes. CSS combining, minifying, removing unused CSS and critical CSS features can drop, reorder or delay your stylesheet, especially right after you add new rules.

Turn off CSS optimisation temporarily and test. If the styles return, regenerate the optimised files or exclude your stylesheet.

Remove-unused-CSS features are the most common cause. They may strip rules for elements that only appear after interaction, such as menus and pop-ups.

Is the child theme actually active?

Check Appearance > Themes and confirm the child theme, not the parent, is active; a surprising number of style problems come from editing the files of a theme that is not running.

The theme preview and the Site Editor can also show a different theme from the one visitors see. Always check the live front end, logged out, in a private window.

Also confirm you edited the file on the right server. Staging and live sites can look identical while running different copies.

If you use a deployment tool or Git, make sure the latest stylesheet was actually deployed.

How do you avoid child theme CSS problems?

Enqueue the stylesheet properly, version it, keep selectors specific but simple, test logged out with caches cleared, and keep a short note of which parent handle your child depends on.

Check your child theme after major parent theme updates. Changes in parent class names or style handles are the usual reason working CSS suddenly stops.

Keep custom CSS in one place. Splitting it between the child theme, Customizer and page builder makes it hard to know which rule wins.

Frequently asked questions

Why is my child theme CSS not loading?

The stylesheet is usually not enqueued, or the header's Template line does not match the parent theme's folder name. Check the Network tab in developer tools to confirm whether the file loads.

Should I use @import in a child theme?

No. Enqueueing the stylesheets in functions.php is the recommended method because it is faster and lets you control load order.

Why do my CSS changes only show when I am logged in?

Logged-out visitors usually get cached pages. Purge your caching plugin, server cache and CDN, and add a changing version number to the stylesheet.

How do I make child theme CSS override Elementor?

Load your stylesheet after Elementor's styles, match Elementor's selectors with equal or higher specificity, then regenerate Elementor's CSS files and clear caches.

Do block themes use the child style.css?

Many block themes do not load the child stylesheet automatically. Enqueue it yourself or make style changes through theme.json and the Site Editor.

Sources

  1. Child Themes WordPress Theme Handbook
  2. wp_enqueue_style() WordPress Developer Resources
  3. Specificity MDN Web Docs
  4. Prevent unnecessary network requests with the HTTP Cache web.dev
  5. Hello Theme Child Elementor on GitHub

Is your product missing, or something out of date?

Tell us what to add or correct. We read every note and reply when we need a source. A message does not buy a ranking.

About the editors

Written and checked byWPLegible Editorial Team Independent WordPress reviews and guides

Researched from the primary sources listed above and checked against our editorial rules before publishing.