Reduce space between widgets on widgetized (not homepage) page

Hello!

The gap between widgets (100px default) is really easy to reduce when it comes to the homepage, using the Wordpress customizer. But I’d love to widgetize some of my other pages, and I’d like to reduce that space there as well.

I think I need some specific code to put in the “additional CSS” section, but I don’t know which one.

Thank you for your help!

Hello there,

You can use the below CSS code:

.page-id-283 .home-wrapper section {
  padding-top: 20px !important;
}

To apply it to your site, add it to Appearance > Customize > Additional CSS from dashboard.

Replace 283 with your page’s ID number. You can easily get it with this plugin:

Regards,
Kharis

Hi,

thank you for the reply! I’ve tried it, but it only reduces the space between the top menu and the first widget. The space between two widgets stays identical.

Please share a link to your site, so I can have a look. Maybe it has unique selector to use.

Regards,
Kharis