• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

How to Change Maximum Width for Existing Posts

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › Design Tips and Tricks › How to Change Maximum Width for Existing Posts

This topic is: not resolved

Tagged: css

  • This topic has 2 replies, 2 voices, and was last updated 13 years, 6 months ago by William.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • December 8, 2012 at 10:28 am #3854
    William
    Member

    Hi,

    I'm migrating from a site from ProPhoto Blog theme to a Genesis theme (probably Streamline). One of the issues I'm facing is that the existing posts used a larger image width than the Genesis themes use, so I'm seeing images extend beyond the blog area into the sidebar.

    The images were uploaded at 1200x800, but the Large media setting was up to a 900px width. I'd like to know if there's a simple way to change the maximum width for existing posts to fit the dimensions of the smaller Genesis content area?

    I did some research and found some CSS code snippets that claim this is pretty simple with code like this example:

    .postContent img {
    margin: 10px;
    border: 3px solid #CCC;
    max-width: 500px;
    width: expression(this.width > 500 ? 500: true);
    }

    Of course, it didn't work when I pasted it into the CSS stylesheet. I figure it's close to what I need, but I lack the understanding to tweak it to do as I need with Genesis.

    Anyone have a suggestion? Thanks.


    –William
    http://williambeem.com

    December 8, 2012 at 11:27 am #3858
    John
    Participant

    Genesis uses a different class for the content...try this instead:

    .entry-content img {
    max-width: 500px;
    }


    John Sundberg | blackhillswebworks.com
    A WordPress developer’s toolbox: Firebug | WordPress Codex | Google šŸ˜‰

    December 8, 2012 at 12:43 pm #3865
    William
    Member

    Thanks, John. Ā That works! Ā The only exception is for photos with captions that still move over into the sidebar, but it's not due to the size of the image. Ā I haveĀ another routine to eliminate the captions, so it's all good from here.

    Again, many thanks. That's much better than having to touch all of those old posts manually.


    –William
    http://williambeem.com

  • Author
    Posts
Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘Design Tips and Tricks’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2026 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble