Archived topic
Style on archive page and not single post
7 replies · Started by David on April 26, 2019
Hello
I've added a line to separate each news post on this archive page...
http://185.20.51.60/~skyworldco/category/press-releases-news/
How can I get it so the line only shows on the archive page and not on the post page...
http://185.20.51.60/~skyworldco/skyworld-features-in-regional-international-magazine/
Thanks
Dave
Hi there,
you can target the element with this selector to add your border:
body:not(.single) .inside-article
Hi David
I change it to this, but it's showing up on other pages...
body:not(.single) .inside-article {border-bottom: 1px solid black;}
http://185.20.51.60/~skyworldco/about-us/
http://185.20.51.60/~skyworldco/aircraft-for-sale-lease/
http://185.20.51.60/~skyworldco/clients/
Any ideas how to get it to show only on the post archive page?
Thanks
Dave
You can string nots:
body:not(.single):not(.page) .inside-article
Or alternatively you can use several specific selectors ie.
.blog .inside-article, .archive .inside-article, .search .inside-article {
/* CSS Styles */
}
Thanks David
You're welcome
Hello
How do I remove the line from the bottom post, last child...
http://www.smartthinkingconsultancy.co.uk/newsite/blog/
Thanks
Dave
Try this CSS:
.site-main>:last-child .inside-article {
border: unset;
}