Featured/Post Image Sizing Help

Community Forums Forums Design Tips and Tricks Featured/Post Image Sizing Help

This topic is: resolved

This topic contains 2 replies, has 1 voice, and was last updated by  zshornick 11 months, 1 week ago.

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

    zshornick
    Participant
    Post count: 9

    Hey everyone,

    I’m having an issue with my Featured/Post Images staying at a full size and was hoping someone could help.

    If you look here: http://clients.impulsemediastudio.com/praxischiro/chiropractic/ you can see that the Featured image is aligned left with a little gap. The image, however, is meant to be the full width at 700×290. It works with my slider widget on the homepage here: http://clients.impulsemediastudio.com/praxischiro/

    I have sized the image myself, regenerated thumbnails, and adjusted the CSS and functions, but to no avail. My code is below. Does anyone have any advice?

    FUNCTIONS

    /** Add new image sizes */
    add_image_size( 'post-image', 700, 290, TRUE );
    
    /** Add Post image above post title, single posts only */
    add_action( 'genesis_before_post', 'agency_post_image' );
    function agency_post_image() {
    
    if ( is_category() ) return;
    if ( has_post_thumbnail() ) {
    if ( $image = genesis_get_image( 'format=url&size=post-image' ) ) {
    printf( '<a href="%s" rel="bookmark"><img class="post-photo" src="%s" alt="%s" /></a>', get_permalink(), $image, the_title_attribute( 'echo=0' ) );
    }
    }
    }

    CSS

    .post-image {
    	margin: 0px;
    	width: 700px;
    	height: 290px;
    }
    • This topic was modified 11 months, 1 week ago by  zshornick.
    • This topic was modified 11 months, 1 week ago by  zshornick.
    http://clients.impulsemediastudio.com/praxischiro/
    #69386

    zshornick
    Participant
    Post count: 9

    I have also tried the following CSS:

    .post-photo {
    	margin: 0px;
    	width: 100%;
    	height: 100%;
    }
    

    and

    .post-photo {
    	margin: 0px;
    	width: 700px;
    	height: 290px;
    }
    
    #69388

    zshornick
    Participant
    Post count: 9

    I figured it out. Sorry. min-width worked. just need to set different css for responsive resolutions

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

You must be logged in to reply to this topic.