Change SideBar Width on Single Post Only
-
Hi, I want to change the left and right sidebar width on single posts(blog) but the CSS is getting reflected on all my pages(Homepage, Static Pages, Archives, category pages)
Here is the code I am using,
@media (min-width: 769px) {
#left-sidebar,#right-sidebar{width: 22.5%;}
#left-sidebar{left: -55%;}
#primary {width: 55%;left: 22.5%;}
}But this is reflecting on all.
I tried something like this,
@media (min-width: 769px) {
body.single{
#left-sidebar,#right-sidebar{width: 22.5%;}
#left-sidebar{left: -55%;}
#primary {width: 55%;left: 22.5%;}
}}But didn’t work.
Please help me with this.
I just want to change the width of both sidebars only on “Single Posts(Blog)”.
The blog page is,
https://questionpapershub.com/reliance-jio-recruitment-for-get-post-in-2020-be-btech-freshers-eligible-apply-online/Also, if you can tell me how to let this CSS work on “static pages, archives and categories”, it will be a great help for me in future.
Thank You.
- The topic ‘Change SideBar Width on Single Post Only’ is closed to new replies.