Home Forums Tutorials and Hints from Users How can I set a custom sidebar-width for all single pages (blogposts)?

This topic contains 2 replies, has 2 voices, and was last updated by  Realbilly 2 years, 3 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #19494



    I set the sidebar-widths for some static pages with that custom css-code:

    @media screen and (min-width:768px) {
    .page-id-2 .l-sb-right-split{width:30%}
    .page-id-2 .l-content-ssb{width:56%;margin-left:14%;}
    .page-id-2 .l-sb-left-split{margin-left:-70%;width:14%}

    Now I would like to have this widths for all my blogpost (single) pages. How could the code be for that?

    Thank you for your help.



    Please don’t double post.

    If you mean single post pages, and if they have the same sidebar configuration as the page with the ID#2, then you can modify the rule to look like below so they also affect the single post pages.

    @media screen and (min-width:768px) {
    .page-id-2 .l-sb-right-split {width:30%}
    .page-id-2 .l-content-ssb {width:56%;margin-left:14%;}
    .page-id-2 .l-sb-left-split {margin-left:-70%;width:14%}
    .single-post .l-sb-right-split {width:30%}
    .single-post .l-content-ssb {width:56%;margin-left:14%;}
    .single-post .l-sb-left-split {margin-left:-70%;width:14%}



    Yesssss! That´s it. Have a lot of thanks from germany. 🙂

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.