[Support request] Border + Spacing around widgets

Home Forums Support [Support request] Border + Spacing around widgets

Home Forums Support Border + Spacing around widgets

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1470241
    Caitriona

    Hello, I wanted to add boxes around my sidebar widgets and used this code:

    .sidebar .widget {
    border: 1px solid rgba(232, 234, 237, 1);
    box-shadow: 0 0 10px rgba(232, 234, 237, 0.5);
    }

    This is great but I also need to increase the spacing between the words and the box outline. How do I go about this?

    #1470402
    David
    Staff
    Customer Support

    Hi there,

    you can add some padding to the widgets in Customizer > Layout > Sidebars –> Widget Padding.

    #1474245
    Caitriona

    Thank you for your response! That’s really helpful πŸ™‚ Is there any way to get this kind of padding on just one or two of the sidebar panels? It seems to make the images much smaller so id like to have it on the text widgets only.

    #1474294
    David
    Staff
    Customer Support

    Aah ok – so i would do this:

    1. Install this plugin:

    https://en-gb.wordpress.org/plugins/widget-css-classes/

    2. With that installed you can now add a CSS class of no-padding to the widgets you want no padding.

    3. Add this CSS to the site:

    #right-sidebar .no-padding {
        padding: 0;
    }
    #1498657
    Caitriona

    I’m not too fond of plugins and maybe it has grown on me the way it is. Happy enough at the moment but might change again later. Thanks πŸ™‚

    #1499382
    David
    Staff
    Customer Support

    Try this CSS:

    #right-sidebar .widget:nth-child(2),
    #right-sidebar .widget:nth-child(8) {
        padding: 20px;
    }

    It will add the padding back to the 2nd and 8th widget.

    #1520988
    Caitriona

    That works really well — thank you so much! πŸ™‚

    #1521143
    David
    Staff
    Customer Support
Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.