• Resolved bougidruche

    (@bougidruche)


    Hi guys,

    Thanks for this great theme I want to create my new blog with.

    If I understand well, image uploaded (and actually content) can’t be larger than 891px width in a post. So basically, you just have to upload images resized with that size.

    My blog will focus on product photography, how can I set the width a little bit larger (let say 1200px) ?

    Thanks,

    Philippe

Viewing 5 replies - 1 through 5 (of 5 total)
  • Theme Author Ben Sibley

    (@bensibley)

    Hi Philippe,

    Thanks for using Chosen!

    Please try adding the following CSS to do that:

    @media all and (min-width: 68.75em) {
    
      .singular .post-content, .singular .post-meta, .error-404 .post-content, .error-404 .post-meta {
        padding: 0 7.14% !important;
      }
    }

    You can copy and paste that code into the “Custom CSS” section in the Customizer (Appearance > Customize). Once added there, it should take affect right away.

    This will reduce the padding on the left/right sides of the post content allowing it to be up to 1200px wide.

    One more thing, in the media settings (Settings > Media), you can define what sizes you want WordPress to create for your images when you upload them. As long as the image is big enough, WordPress will automatically create a thumbnail, medium, and large version in addition to preserving the original upload. This can be really helpful when you need different sizes of your images throughout the site.

    Thread Starter bougidruche

    (@bougidruche)

    Hi Ben,

    Thanks a lot for your help.

    It works fine but is it possible to just have the image in 1200px and the rest of the post-content and post-meta with original config ?

    Philippe

    Theme Author Ben Sibley

    (@bensibley)

    Sure, this can be done with just one compromise.

    In order to size the images at exactly 1200px we need to also keep the post content width static (it changes a bit with the width of the screen currently). The CSS below will keep the content a bit narrower, but the images will be 1200px wide on all screens 1300px and wider:

    @media all and (min-width: 1300px) {
    
      .post-content {
        width: 1192px !important;
        margin: 0 auto;
      }
      .post-content .alignnone,
      .post-content .alignleft,
      .post-content .aligncenter,
      .post-content .alignright {
        position: relative;
        width: 1200px;
        max-width: 1200px;
        left: -230px;
        margin: 24px auto;
      }
    }
    Thread Starter bougidruche

    (@bougidruche)

    Works great thank you Ben !

    Theme Author Ben Sibley

    (@bensibley)

    No problem, happy to help 🙂

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘image size and content width’ is closed to new replies.