• 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

Change Width of Post using Custom Post Class

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 › Change Width of Post using Custom Post Class

This topic is: not resolved

Tagged: Infinity Pro, landing page, max-width

  • This topic has 8 replies, 3 voices, and was last updated 8 years, 4 months ago by scaught.
Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • February 16, 2017 at 7:59 pm #201358
    scaught
    Member

    Hey, all.

    I need to widen the content area for some specific content. I would like to use the Custom Post Class option but am running into a problem.

    Simply put, I want the content area 1000px wide. However, when I use a customer class like this:

    .livestreamwide {
    width: 1000px;
    }

    The content widens correct but SHIFTS to the right. I can add a negative left-margin to fix but I know that's wrong.

    What would I add to this class to fix the "shift-to-the-right" problem?

    Thanks,

    February 16, 2017 at 11:34 pm #201365
    Victor Font
    Moderator

    Can you post a link to the site? You're probably bumping up against the structural wrap.


    Regards,

    Victor
    https://victorfont.com/
    Call us toll free: 844-VIC-FONT (842-3668)
    Have you requested your free website audit yet?

    February 17, 2017 at 12:56 am #201366
    scaught
    Member

    Our Approach

    February 17, 2017 at 6:16 am #201374
    Brad Dalton
    Participant

    Try line 641 style.css

    .landing-page .site-inner {
    	margin-top: 0;
    	max-width: 840px;
    }
    

    Tutorials for StudioPress Themes.

    February 17, 2017 at 7:49 am #201378
    Victor Font
    Moderator

    As I was reviewing the source code on your site, I couldn't help but notice that you are using div align="center" throughout the page. The <div> align attribute is not supported in HTML5. You should be using CSS instead. https://www.w3schools.com/tags/att_div_align.asp

    The reason your content area is being pushed over to the right is because the CSS for .full-width-content .content has a max-width of 840px. The custom post class would be a child element of content. It has no room to grow.

    A better approach might be to add a content class and set that to max-width: 1000px for the specified pages.


    Regards,

    Victor
    https://victorfont.com/
    Call us toll free: 844-VIC-FONT (842-3668)
    Have you requested your free website audit yet?

    February 17, 2017 at 9:59 am #201383
    scaught
    Member

    Thanks for the CSS center tip. It doesn't work on the videos being centered, however.

    Great info on the width problem. You win smartest guy on the Internet for today!

    I, otoh, am NOT in that league and am not sure how to. . ."add a content class and set that to max-width: 1000px for the specified pages."

    Could you help a bit more with this guidance? Where and how would I do this?

    Thanks!

    February 17, 2017 at 10:05 am #201384
    scaught
    Member

    Thanks for the idea. Tried increasing to 1000px, still have same problem.

    February 17, 2017 at 11:10 am #201390
    Victor Font
    Moderator

    This should help adding the class: https://victorfont.com/genesis-framework-add-a-custom-css-class-to-elements/

    You would use the genesis_attr-content hook. You would also have to wrap your code in a conditional so it only changes the specified pages.

    As for centering videos, you still shouldn't use align="center". It's not supported in HTML5 and will eventually fail you. You would create a class for .wp-video in style.css and use margin: 0 auto; to center the videos.


    Regards,

    Victor
    https://victorfont.com/
    Call us toll free: 844-VIC-FONT (842-3668)
    Have you requested your free website audit yet?

    February 17, 2017 at 11:20 am #201391
    scaught
    Member

    Thanks, Victor. I wish I knew where to do the things you're suggesting. . .but I don't.

    Would it be possible to tell me:

    1. What code to write and in what file?
    2. How I would invoke the code in the specific page needing a wider page?

    Thanks again.

  • Author
    Posts
Viewing 9 posts - 1 through 9 (of 9 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

© 2025 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