Archived topic
Widget Title Spacing Conflict
3 replies · Started by bluebit on February 9, 2020
I'm tried this the code for my Tags Widget, I put this code in Tom's Custom CSS plugin:
.widget-title {
margin-bottom: 1px; /* adjust accordingly */
}
It got fixed, but created another problem.
Since I also have a Ad widget that is fixed as you scroll down the page, the above code made it so the ad widget doesn't work anymore, here is the plugin I used to make widgets fixed: https://wordpress.org/plugins/q2w3-fixed-widget/
What I need is this above code to work only for 1 widget and not all my widgets. Is there a way to add this custom css code just for my Tags Widget?
I have siteorigin layout builder and I know I could add the Tag Widget inside of the Layout Builder widget, which means I can add some custom attributes/css styles to the widget, but I have no idea what to add.
Summary: I basically want the reduce/adjust the white spacing between the Tags Widget Title and the tags without conflicting with the Ads Banner Widget, which is a fixed widget that scrolls down with the page.
Hi there,
that CSS really shouldn't interfere with the sticky advert, but if you want to target a specific widget you can use the nth-child selector like so:
.inside-right-sidebar aside:nth-child(2) .widget-title {
margin-bottom: 1em;
}
This will target the 2nd widget in the right sidebar.
thank you :)
You're welcome