style.css
:
.wp-site-blocks {
padding-top: 0;
padding-bottom: 0;
}
If you don’t want the bottom padding, just remove it. If you aren’t using a child theme, you can add this to your ‘Additional CSS’ section. If you don’t see the ‘Customize’ section, you can just add /wp-admin/customize.php
to your domain.
Appearance > Editor
and open your page template. Once there click the Styles icon > Layout
as shown in this screenshot and change the top and bottom padding to 0.
To get to the Layout options, go to into the Editor, select Styles in the top right, and in the styles panel you should see:
Click Layout to open the panel, and you should see the main content dimensions controls, including the content width, the main content padding controls, and the default block gap setting.
You can click “unlink sides” on the padding control to open up separate controls for top, right, bottom, left.
Here you would enter “0” for the top & bottom padding, and this will be applied to the?wp-site-blocks
?container, and remove the space from above the header and below the footer.
Here is a short video https://d.pr/v/HGeqiE
]]>I *did* sort it, but by installing a different theme and ignoring all the additional bits that they suggested.
Ok! I am going to mark this thread as resolved ??
]]>Thank you for that – it’s hard to remember exactly where to find each setting.
]]>корень данной проблемы лежит в файле wp-includes/class-wp-theme-json.php
в этом файле есть запись:
“$css .= ‘.wp-site-blocks { padding-top:”
и этому свойству назначается параметр имеющий значение по умолчанию.
С моей точки зрения, сама идея того что свойству корневого блока может быть присвоено в качестве значения по умолчанию что-либо отличное от нуля, является ошибочной.
Если пользователю надо – он сам добавит столько отступов, сколько надо. Но не иметь возможности удалить отступ (почти в любом случае, пустое место над шапкой сайта выглядит несуразно.) без того чтобы искать какие-то обходные пути, копаться в коде, и т.д. – это плохой подход.
Лично я, просто ставлю в этом файле значением по умолчанию “0” для отступов, без того чтобы перегружать сайт излишними и ненужными плагинами, навешиванием избыточных дополнительных стилей и прочего.
и да, @thelmachido, твое решение не работает. оно не касается корневых блоков, а только унаследованных от корневых блоков.
]]>