• Resolved rishabhsingh12

    (@rishabhsingh12)


    Check the link I attached, you’ll see that the post is really wide. I want to reduce it width to make it a bit more readable. I’ve searched all customization options but couldn’t find anything.
    I want to do this for post pages only.

    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • Hi @rishabhsingh12 ,

    Go to Appearance → Customize → Additional CSS (the menu labels might be different in your language) and add the code below:

    .single-post .container {
        width: 80%;
    }

    Let me know if that does it.

    — Youcef

    Thread Starter rishabhsingh12

    (@rishabhsingh12)

    Thanks @youcef-ayoub , it works.

    Thread Starter rishabhsingh12

    (@rishabhsingh12)

    Hi, @youcef-ayoub , Actually there is one problem in your method. This code works on both PC and Mobile devices. And on Mobile devices the width of the post becomes so narrow that it’s really hard to read.

    Edit: I solved this issue by adding Media Queries.
    we have to add @media only screen and (min-width: 600px) { /your code/ }

    @rishabhsingh12
    add this code

    @media only screen and (min-width: 600px) {
    .single-post .container {
        width: 80%;
    }
    }

    Let me know if that does it.

    — Youcef

    Thread Starter rishabhsingh12

    (@rishabhsingh12)

    Hi, @youcef-ayoub Yes it worked fine for mobiles and desktops. But I also want full width container on Tablet devices.

    I used 900 in place of 600px :
    @media only screen and (min-width: 900px) {
    .single-post .container {
    width: 60%;
    }
    }

    Now, a tablets width must be less than 900px, but still it’s applying 80% container-width in tablets also.

    I only want to reduce container size in desktop, Mobiles and tablets settings should remain as default.

    Thread Starter rishabhsingh12

    (@rishabhsingh12)

    What I want is:
    I want full screen layout on tablets and mobiles, please give me a code for that.

    @rishabhsingh12
    add this code

    
    @media only screen and (min-width: 1000px) {
    .single-post .container {
        width: 100%;
    }
    }
Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘How to reduce the container width on post pages?’ is closed to new replies.