This thread is over two years old and may be outdated. Please create a new thread if you need help, or email us if you have an active Premium license.

Image size over a post

11 years ago · Last reply by Andrew Misplon 11 years ago

Hello,

(I’m sorry for my english, it’s the translator)

How can I get an automatic resize my images above my posts. Is it possible to change the size of this image? Link example.

I have this problem with all the posts. I resized the images in library but nothing changes.

Thank you in advance for your replies

URL: http://www.nitro-design.be/blocs-note-autocopiant/

This is our free support forum. Replies can take several days.

Need fast email support? Get SiteOrigin Premium

Replies

7
  1. Andrew Misplon Staff 11 years, 1 month ago

    Hi nitrous

    You can try the following under Appearance > Custom CSS and adjust as required.

    /* Set a max-width for the single post and archive featured image */
    .single .entry-thumbnail img {
    margin-right: auto;
    margin-left: auto;
    max-width: 50%;
    }
    article.post .entry-header .entry-thumbnail img {
    margin-right: auto;
    margin-left: auto;
    max-width: 50%;
    }
  2. nitrous 11 years, 1 month ago

    Thank you for your reply.
    This solution solved the problem for the width but not the height.
    Example: http://www.nitro-design.be/beach-flag-vitalite-services/
    I added “max-height: 30%;” , but nothing has changed.

    There is also the image isn’t complete display
    Example: http://www.nitro-design.be/blocs-note-autocopiant/
    http://www.nitro-design.be/feuilles-autocopiantes/
    But not on all posts

  3. Andrew Misplon Staff 11 years, 1 month ago

    Please try the following and see how that goes:

    /* Set size for the single post and archive featured image */
    .single .entry-thumbnail img {
    margin-right: auto;
    margin-left: auto;
    height: 50%;
    }
    article.post .entry-header .entry-thumbnail img {
    margin-right: auto;
    margin-left: auto;
    height: 50%;
    }

    Adjust as required.

  4. Andrew Misplon Staff 11 years, 1 month ago

    You can remove margin-left: auto; margin-right: auto; if you don’t want the image to center.

  5. nitrous 11 years, 1 month ago

    I tried but nothing changed

  6. nitrous 11 years, 1 month ago

    Except “margin”, it works well.

  7. Andrew Misplon Staff 11 years, 1 month ago

    Phew, ok, if I go back to my original CSS, that does seem to work:

    /* Set a max-width for the single post and archive featured image */
    .single .entry-thumbnail img {
    margin-right: auto;
    margin-left: auto;
    max-width: 50%;
    }
    article.post .entry-header .entry-thumbnail img {
    margin-right: auto;
    margin-left: auto;
    max-width: 50%;
    }

    The other option is to use the Simple Image Sizes plugin to change the size of the images:

    https://wordpress.org/plugins/simple-image-sizes/

    After using that, you need to run the Regen Thumbnails plugin:

    https://wordpress.org/plugins/regenerate-thumbnails/

Replies on this thread are closed.

Please create a new thread if you have a question, or purchase a SiteOrigin Premium license if you need one-on-one email support.

Have a different question or issue?

Start New Thread