How to Fix Common Color and Background Issues in the Twenty Seventeen Theme
Content
Many users of the Twenty Seventeen theme encounter challenges when trying to customize colors, backgrounds, and other visual elements. These issues often stem from the theme's specific CSS structure and the interaction between its built-in color schemes and custom CSS. This guide compiles the most common problems and their solutions, based on community discussions.
Common Problems and Their Solutions
1. White Band or Footer Background Not Changing
Problem: After changing the main background color, a white band remains in the footer or content area.
Solution: This is often controlled by the theme's "Transparent Content Background" option. Navigate to Appearance → Customize → Colors and check the 'Transparent Content Background' checkbox. If you need more control, the following CSS can be added to Appearance → Customize → Additional CSS:
.site-footer, .site-content-contain { background-color: your-color-here; }
2. Custom CSS Not Working with Dark Color Scheme
Problem: Custom CSS rules work in the Light scheme but have no effect when the Dark color scheme is active.
Solution: The Dark scheme adds a .colors-dark class to the body, which can override your custom CSS. To ensure your styles apply, you must include this class in your selectors. For example, to change the menu background in the dark scheme:
.colors-dark .navigation-top { background-color: #548138; }
3. Changing Global Text and Link Colors
Problem: Text or link colors are too light, especially in dark mode, or don't change with global CSS.
Solution: Use the following CSS examples in the Additional CSS panel, making sure to target the correct elements. For dark mode, remember to prefix with .colors-dark.
/* Global text color */
body, p { color: #000; }
/* Global link color */
a { color: #eaae3d; }
/* Link hover color */
a:hover { color: #ccc !important; }
/* Footer link color */
.site-footer a, .site-info a { color: #ccc; }
/* Caption text color */
.wp-caption-text { color: #fff; }
4. Styling Third-Party Elements in Dark Mode
Problem: Forms or elements from plugins (e.g., WooCommerce, Business Directory) have unreadable text (light on white) when the Dark theme is active.
Solution: You need to specifically target these elements and override their styles. For instance, to fix WooCommerce radio buttons or form dropdowns:
.colors-dark input, .colors-dark select { color: #000; background: #fff; }
5. Removing or Changing Unwanted Lines and Borders
Problem: Unwanted lines appear at the bottom of pages or around elements.
Solution: These are often borders or box-shadows. Inspect the element with your browser's developer tools to identify the exact CSS property, then use code like this to remove or change it:
.entry-content, .hentry, .page-content { box-shadow: none; border: none; }
Best Practices for Adding Custom CSS
- Use Additional CSS: Always add custom code to Appearance → Customize → Additional CSS. This is safer than editing theme files directly.
- Use a Child Theme: For extensive modifications, consider using a child theme to prevent your changes from being overwritten by theme updates.
- Specificity is Key: If a rule isn't working, your CSS selector may not be specific enough. Use your browser's inspector tool to find the exact classes being used by the theme and mimic or override them.
- Use !important Sparingly: While
!importantcan force a style to apply, it can make future CSS changes difficult. Try using more specific selectors first.
By understanding how the Twenty Seventeen theme structures its color classes and using targeted CSS, you can overcome most common styling hurdles and achieve the look you want for your site.
Related Support Threads Support
-
make header text and comment links colorhttps://wordpress.org/support/topic/make-header-text-and-comment-links-color/
-
Editing Background Color in colors-dark.csshttps://wordpress.org/support/topic/editing-background-color-in-colors-dark-css/
-
Change background of post?https://wordpress.org/support/topic/change-background-of-post/
-
Eliminate White Band in Footer?https://wordpress.org/support/topic/eliminate-white-band-in-footer/
-
Remove lines before and after contenthttps://wordpress.org/support/topic/remove-lines-before-and-after-content/
-
Changing text colour in captionshttps://wordpress.org/support/topic/changing-text-colour-in-captions/
-
Change woocommerce button colour in Twenty Seventeenhttps://wordpress.org/support/topic/change-woocommerce-button-colour-in-twenty-seventeen/
-
Footer background colorhttps://wordpress.org/support/topic/footer-background-color-4/
-
change colors of wpsl-wrap : theme twentyseventeenhttps://wordpress.org/support/topic/change-colors-of-wpsl-wrap-theme-twentyseventeen/
-
Color Picker does not work properly since last updatehttps://wordpress.org/support/topic/color-picker-does-not-work-properly-since-last-update/
-
CSS Code For Text Color in 3rd Party Formshttps://wordpress.org/support/topic/css-code-for-text-color-in-3rd-party-forms/
-
Changing link color except for the menu?https://wordpress.org/support/topic/changing-link-color-except-for-the-menu/
-
Make header area same grey shade as bodyhttps://wordpress.org/support/topic/make-header-area-same-grey-shade-as-body/
-
Text colorhttps://wordpress.org/support/topic/text-color-56/
-
Heading Typography – colourhttps://wordpress.org/support/topic/heading-typography-colour/
-
Striped table rows in dark mode : not readablehttps://wordpress.org/support/topic/striped-table-rows-in-dark-mode-not-readable/
-
Radio buttons wrong colour with Twenty Seventeen dark option using Woocommercehttps://wordpress.org/support/topic/radio-buttons-wrong-colour-with-twenty-seventeen-dark-option-using-woocommerce/
-
Printing 2017 dark themehttps://wordpress.org/support/topic/printing-2017-dark-theme/
-
Gray Background to Postshttps://wordpress.org/support/topic/gray-background-to-posts/
-
link hover color css thinghttps://wordpress.org/support/topic/link-hover-color-css-thing/
-
Custom Color does not workhttps://wordpress.org/support/topic/custom-color-does-not-work-2/
-
background colorhttps://wordpress.org/support/topic/background-color-218/
-
Customizeable color not in editorhttps://wordpress.org/support/topic/customizeable-color-not-in-editor/
-
How can i change the site title colourhttps://wordpress.org/support/topic/how-can-i-change-the-site-title-colour/
-
Control background color with child themehttps://wordpress.org/support/topic/control-background-color-with-child-theme/
-
How to change icon colourhttps://wordpress.org/support/topic/how-to-change-icon-colour/
-
Add hover link color to footer.phphttps://wordpress.org/support/topic/add-hover-link-color-to-footer-php/
-
Changing colour of h4 headinghttps://wordpress.org/support/topic/changing-colour-of-h4-heading/
-
How can I call the native dark color scheme via CSS?https://wordpress.org/support/topic/how-can-i-call-the-native-dark-color-scheme-via-css/
-
Upcoming Featured Events Color Highlighthttps://wordpress.org/support/topic/upcoming-featured-events-color-highlight/
-
Creating table borders (?)https://wordpress.org/support/topic/creating-table-borders/
-
Unable to customize colors in dark color schemehttps://wordpress.org/support/topic/unable-to-customize-colors-in-dark-color-scheme/
-
colour of hover transitions on linkshttps://wordpress.org/support/topic/colour-of-hover-transitions-on-links/
-
Cannot figure out how to change backgroundhttps://wordpress.org/support/topic/cannot-figure-out-how-to-change-background/
-
twenty seventeen product category page line at bottomhttps://wordpress.org/support/topic/twenty-seventeen-product-category-page-line-at-bottom/
-
Background colours for different postshttps://wordpress.org/support/topic/background-colours-for-different-posts/