Leo
(@leohsiang)
Hi there,
Try this instead:
body.single .inside-article, body.single .sidebar .widget, body.single .comments-area {
border-top: 4px solid;
border-image: linear-gradient(to right, #ff117f, #ffa014) 30 stretch !important;
}
Thread Starter
vikral
(@vikral)
Hi Leo,
I just checked. The Given CSS code is not working on pages. eg. about us page, policy pages, etc it’s not working there.
Leo
(@leohsiang)
That’s because the CSS is targetting posts only as you requested in the original message.
So what is the condition you are looking for?
Everything except the home page?
If so then try this:
body:not(.home) .inside-article, body:not(.home) .sidebar .widget, body:not(.home) .comments-area {
border-top: 4px solid;
border-image: linear-gradient(to right, #ff117f, #ffa014) 30 stretch !important;
}
Thread Starter
vikral
(@vikral)
Everything except the home page. And Category Pages and also Tags pages
example.com/category/name
example.com/tags/name
Leo
(@leohsiang)
Try this:
body:not(.home):not(.archive) .inside-article, body:not(.home):not(.archive) .sidebar .widget, body:not(.home):not(.archive) .comments-area {
border-top: 4px solid;
border-image: linear-gradient(to right, #ff117f, #ffa014) 30 stretch !important;
}
Thread Starter
vikral
(@vikral)
Hi, @leohsiang
I need to remove the top border from the search result page.
body:not(.home):not(.archive) .inside-article, body:not(.home):not(.archive) .sidebar .widget, body:not(.home):not(.archive) .comments-area {
border-top: 4px solid;
border-image: linear-gradient(to right, #ff117f, #ffa014) 30 stretch !important;
}
I used this CSS
-
This reply was modified 5 years, 7 months ago by
vikral.
Include :not(.search) on your body selector.
Try this out.
body:not(.home):not(.archive):not(.search) .inside-article, body:not(.home):not(.archive):not(.search) .sidebar .widget, body:not(.home):not(.archive):not(.search) .comments-area {
border-top: 4px solid;
border-image: linear-gradient(to right, #ff117f, #ffa014) 30 stretch !important;
}