How to Reduce White Space and Adjust Layout Spacing in Twenty Sixteen
Content
Many users of the Twenty Sixteen theme find themselves wanting to adjust the default spacing, particularly the prominent white space around headers, menus, and content areas. This is a common request for those looking to create a more compact, custom layout. Based on community discussions, here are the most effective solutions.
Why is There So Much White Space?
The Twenty Sixteen theme is designed with a focus on readability and a clean, modern aesthetic. This often results in significant padding and margins around key elements. While this is great for many sites, sometimes a tighter layout is desired. These adjustments are typically made by adding custom CSS.
Common Solutions for Reducing Spacing
1. Adjusting Header and Menu Spacing
A frequent target for adjustment is the space above, below, and within the header (#masthead). To reduce the padding below the header (which affects the space before the content begins), you can use this CSS:
#masthead.site-header {
padding-bottom: 10px !important;
}
You can adjust the 10px value to your liking. A smaller number will reduce the space further.
2. Reducing Space Between Posts or Widgets
To tighten the space between widgets in a sidebar or between posts on a page, you will need to target the specific elements. The CSS required can vary greatly depending on your setup, but often involves adjusting the margin or padding on elements like .widget.
3. Centering Content After Changing Width
If you change the width of your main content area and it becomes off-center, remember to add auto margins. A common fix is:
#page {
max-width: 70%;
margin-left: auto;
margin-right: auto;
}
4. Hiding Page Titles
To remove page titles that you don't want to display, use the following CSS:
.page h1.entry-title {
display: none;
}
How to Add This Custom CSS
To implement any of these changes:
- Navigate to your WordPress Dashboard.
- Go to Appearance > Customize.
- Click on Additional CSS.
- Paste your desired CSS code into the provided box.
- Publish the changes.
Important: It is highly recommended to use a child theme or a custom CSS plugin to make these changes. This prevents your modifications from being overwritten when the theme is updated.
Troubleshooting Tips
- Use your browser's inspector tool (right-click on an element and select 'Inspect') to identify the exact CSS classes controlling the spacing you want to change.
- After adding CSS, clear your browser and site cache to see the changes immediately.
- The
!importantrule can help override stubborn default styles, but use it sparingly.
Remember, these solutions are based on common community fixes. Your specific site may require slightly different CSS selectors depending on other plugins or customizations you have active.
Related Support Threads Support
-
Header/Logo Dilemahttps://wordpress.org/support/topic/header-logo-dilema/
-
Center everything while change screen sizehttps://wordpress.org/support/topic/center-everything-while-change-screen-size/
-
Decrease Space Heading & Texthttps://wordpress.org/support/topic/decrease-space-heading-text/
-
hot spots and content width.https://wordpress.org/support/topic/hot-spots-and-content-width/
-
Header : remove white spacehttps://wordpress.org/support/topic/header-remove-white-space/
-
Spacing on smaller screenshttps://wordpress.org/support/topic/spacing-on-smaller-screens/
-
Reduce White Space Between Top Menu and Header Imagehttps://wordpress.org/support/topic/reduce-white-space-between-top-menu-and-header-image/
-
Header paddinghttps://wordpress.org/support/topic/header-padding-7/
-
Reduce space between widgetshttps://wordpress.org/support/topic/reduce-space-between-widgets-2/
-
What are the smaller screen em values based on?https://wordpress.org/support/topic/what-are-the-smaller-screen-em-values-based-on/
-
Menu line spacing isseuhttps://wordpress.org/support/topic/menu-line-spacing-isseu/
-
how to lower the width of the right column !?https://wordpress.org/support/topic/how-to-lower-the-width-of-the-right-column/
-
how to remove white space above menuhttps://wordpress.org/support/topic/how-to-remove-white-space-above-menu/
-
Make site title bigger and centralhttps://wordpress.org/support/topic/make-site-title-bigger-and-central/
-
Remove blank space between menu and contenthttps://wordpress.org/support/topic/remove-blank-space-between-menu-and-content/
-
Remove white space between posts on homepagehttps://wordpress.org/support/topic/remove-white-space-between-posts-on-homepage/
-
too much white spacehttps://wordpress.org/support/topic/too-much-white-space-3/
-
Adjust width?https://wordpress.org/support/topic/adjust-width-2/
-
Tighten space between post title and paragraphhttps://wordpress.org/support/topic/tighten-space-between-post-title-and-paragraph/
-
How to change the spacing between menu – content and top of the page – menuhttps://wordpress.org/support/topic/how-to-change-the-spacing-between-menu-content-and-top-of-the-page-menu/
-
Need to narrow padding/space between elementshttps://wordpress.org/support/topic/need-to-narrow-paddingspace-between-elements-2/
-
Mobile login page CSS problemhttps://wordpress.org/support/topic/mobile-login-page-css-problem/
-
Centering content between 710px and 909px?https://wordpress.org/support/topic/centering-content-between-710px-and-909px/
-
Customizing left and right content margin for specific pagehttps://wordpress.org/support/topic/customizing-left-and-right-content-margin-for-specific-page/
-
Reducing White Space in Sidebarhttps://wordpress.org/support/topic/reducing-white-space-in-sidebar/
-
How reduce white space in twenty sixteen version 1.2https://wordpress.org/support/topic/how-reduce-white-space-in-twenty-sixteen-version-12/
-
How to change spacing above nav menu, get rid of page titles and logo questionshttps://wordpress.org/support/topic/how-to-change-spacing-above-nav-menu-get-rid-of-page-titles-and-logo-questions/
-
Less space between heading and music playerhttps://wordpress.org/support/topic/less-space-between-heading-and-music-player/