Hi,
Since Twenty Twenty-Five is a block theme, some styles are controlled through theme.json and Global Styles rather than only through style.css.
A few things to check:
- Make sure the child theme is activated
Go to Appearance → Themes and confirm the child theme is the active theme.
- Verify the child theme is loaded correctly
You mentioned that some non-container styles are working, which suggests the stylesheet is loading correctly.
- Check for Global Styles /
theme.json overrides
With block themes like Twenty Twenty-Five, styles for elements such as body, header, and other containers may be generated dynamically by WordPress from:
theme.json
- Global Styles (Appearance → Editor → Styles)
These generated styles may override or bypass simple selectors in style.css.
- Try increasing specificity temporarily
For testing purposes, try something like:
body {
background: red !important;
}
If that works, then the issue is likely related to specificity or generated styles.
- Inspect the actual DOM structure
Some block themes do not use plain header or main elements in the way classic themes did. The visible containers may instead use nested block wrappers with generated classes.
- Child theme documentation
You may also want to review the official child theme documentation:
https://developer.wordpress.org/themes/advanced-topics/child-themes/
If possible, sharing the specific CSS rule you are trying to apply would help identify the exact cause.
As an additional development-only test, you can also temporarily use cache-busting when enqueueing the child stylesheet:
wp_enqueue_style(
'child-style',
get_stylesheet_uri(),
[],
time()
);
This should only be used during development/testing, not on a production site.
Thank you. It appears it was a caching problem after all.