Sidebar text widget border and padding

Hi, on happysoulhungrymind.com/HWP/blog I have added a text widget to the sidebar.

  1. How can I put it in the same box (with a border) like the Recent Posts widget?
  2. Or, alternately, remove all the borders and reduce the padding on all sidebar widgets

Hello Ravi,

Thanks for writing in!

2.) To remove the border and padding of your widget, please add the following CSS code in the X > Theme Options > Global CSS (http://prntscr.com/evui3r)

.widget ul, 
.widget ol,
.widget ul li,
.widget ol li {
    border: none;
    padding: 7px 0 !important;
}

1.) And if you want the whole sidebar inside a box, you can make use of this code:

.x-sidebar {
    box-shadow: 0 0.15em 0.35em 0 rgba(0,0,0,0.135);
    padding: 0 15px;
}

Regards.

Hi RueNel: I want to put just the text widget inside a box like the other widgets. How do I do that? Thanks.

Hello Ravi,

You mean you want to have like this?

You will need to edit your text widget and add something like this:

<h4>Sub Title</h4>
<div class="border">
  <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer scelerisque eros eu pulvinar dictum. Nunc egestas massa at elit bibendum, cursus fringilla nunc faucibus. Proin dignissim efficitur nunc a cursus.</p>
</div>

And then, please add the following CSS code in the X > Theme Options > Global CSS (http://prntscr.com/evui3r)

.x-sidebar .border {
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 6px;
    padding: 10px;
    margin-bottom: 1em;
}

Just to manage your expectations, this isn’t specifically a theme issue, but rather, your customisation of it. So whilst I have happily provided you with some guidance above on how to get it working, we cannot provide theme customisation as a general rule, or support custom code solutions provided. Therefore, you might find it helpful to check out the following:

CSS Selector Reference
How to find the css selector in chrome

Regards.

Thank you so much, RueNel. I really appreciate your help.

You’re most welcome!
Thanks for letting us know that it has worked for you.

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