Site logo

Archived topic

Trying to remove grey line in sidebar

13 replies · Started by RJ on November 18, 2018

Viewing posts 1–14 of 14

Hi there - I am trying to remove the grey colour around my sidebar widgets so only the black line on the right shows. See https://www.robinharford.com/

I can't for the life of me figure this out, so any help much appreciated.

TIA

Robin

Hi there,

Its being added by this CSS:

.sidebar .widget {
	border: 1px solid #efefef;
}

Look for it in the Customizer > Additional CSS. I assume you used a GP Site, so its a left over from that.

David, you're a star! Thanks so much, it had me head thumping my desk there for awhile :-).

ATB, Robin

Glad to be of help :)

Hi there,

you can remove the background color and the padding from the last widget with this CSS:

#right-sidebar .widget:last-child {
    background-color: transparent;
    padding: 0;
}

Thanks a lot! How to do that any particular widget? Say the third or fourth one if it exists.

You would use the :nth-child(#) pseudo selector e.g

/* Third widget */
#right-sidebar .widget:nth-child(3) {
    background-color: transparent;
    padding: 0;
}

Ok, thanks.

Can I disable or add some other widget depending on a particular page?

Okay, so no way to do it natively in generatepress or via code?

GP doesn't manage widget area conditions at this time. Currently a plugin is the best way to do this.
The alternative and if you're happy to add all of the widgets and hide them using CSS then you can do this:

.page-id-XXXX #right-sidebar .widget:nth-child(3) {
    display: none;
}

The XXXX in the .page-id-XXXX you would swap for the ID of the page where you want that widget hidden.

Got it.

thanks!

You're welcome

This archived topic is closed to new replies.