WordPress.org

Forums

Maximum Image Size On Front Page (3 posts)

  1. laubacht
    Member
    Posted 4 years ago #

    http://www.tornadoeskick.com

    I am wondering if a code exists to resize images on the front page so that they fit within the column widths. I do not use the media uploader in WP. Instead, I upload my images to image folders within my site and link using the standard IMG command.

    The front page displays the entry in a two column layout that is smaller than my standard image size (700px). However, single article pages do not have the sidebar and thus expand the content area to accommodate the images.

    Is there a code I can add to the front page file that will resize any images bigger than 500px to a set size (i.e. 500px)?

    Thanks all!

  2. Joseph
    Member
    Posted 4 years ago #

    Add this to your CSS file:

    .rt-article-content img {
    	max-width:100%;
    	height:100%;
    }
  3. laubacht
    Member
    Posted 4 years ago #

    Thanks Joseph,

    I tweaked the code to maintain the aspect ratio of the image, and it all worked great. Thanks!

    .rt-article-content img {
    	max-width:600px;
    	height:100%;
    }

Topic Closed

This topic has been closed to new replies.

About this Topic