Reduce space in News, right column

Hello,
I’m using X, with the “Agency” setup and the Stack “Icon”.
In the NEWS section how can I remove the space in the right column between one widget and another?

I enclose a screeenshot, I would like to reduce the space indicated by the red arrow to about 1/10 of the current space.
Thanks for the support

Hey @webSF,

Please add this code in X > Theme Options > CSS:

.x-sidebar .widget {
    margin-top: 20px;
}

Hope this helps.

Thanks a lot, it works !!
If I wanted to change only the space between certain widgets, for example between the search bar and the widget of recent articles, which code should I enter?

Hi @webSF,

There is a default 65px top margin for every widget which is overridden by the code previously suggested.

If you want the gap to be different per widget, you can install a plugin that allows you to add a class to the widget.

Once you assigned a class to a widget, use the code:

.x-sidebar .widget.thewidgetclass {
    margin-top: 20px;
}

The code above will set the top margin of the widget with class thewidgetclass. You can assign other classes to other widgets and copy the code block above and change thewidgetclass to the class you assigned to the widget.

Hope this helps.

1 Like

Perfect solution!! Thanks :wink:

You are most welcome. :slight_smile:

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.