Site logo

Archived topic

CSS help for content width

7 replies · Started by Paul on January 18, 2021

Viewing posts 1–8 of 8

Hello,

I'm trying to change a single page to width of 1170px but I have some custom css which is causing me some problems.

This is the custom css I added previously which is in use on several pages -

body.no-sidebar .site.grid-container {max-width: 800px}

This css is over riding any other width settings, is there a way of changing this for a specific post?

I tried over riding with this but no joy.

.page-id-11465 body.no-sidebar .site.grid-container {
    max-width: 1170px!important;
}

Please advise

Hi there,

page-id-xxx classes are also a body class, so try:

body.page-id-11465  .site.grid-container {
    max-width: 1170px!important;
}

I'm actually using a post for this and have the following which is not working.

body.post-id-20044  .site.grid-container {
    max-width: 1170px!important;
}

Post URL has been added below.

Can you disable you cache plugin i can see why its not applying ?

Done

That link you provided is actually a post with a different ID - so the CSS for that would be:

body.postid-20044  .site.grid-container {
    max-width: 1170px!important;
}

Sorry about that - works perfectly now. Thanks

No problems - glad to be of help

This archived topic is closed to new replies.