Single Post Text Width

  • Posted in : TheBlogger
  • gkam2
    Participant

    Hello! Apologies if this has already been asked.

    I have a series of single posts (ex: Site in private content) and I’d like to increase the width of the text area.

    Changing the ‘post style’ under settings seems to only change the featured image width, not the text width.

    So two questions
    1. What is the best way to increase the width of the text area on a single post?
    2. What is the best way to limit the width of a featured image on a single post? I like the featured image, but it gets too big sometimes.

    serkan
    Moderator

    Hi,
    You can put limit on featured images on single post via this css code;

    .single-post .featured-image img { max-width: 740px; }

    You can increase the single post width via this css code;

    .single-post .layout-fixed { max-width: 1000px; }

    Thanks

    gkam2
    Participant

    This worked great. Confirmed that both of the CCS snippets worked for me.

    Small other question: Should these go in the custom CSS section? Or Additional CCS section?

    What’s the difference?

    serkan
    Moderator

    Hi, One of them is old way one of them is new way.
    https://www.pixelwars.org/forums/topic/how-to-use-custom-css-for-wordpress-themes/
    Thanks

    gkam2
    Participant

    Hey! The featured image width reduction worked great on the desktop view.

    However on mobile, the image width far exceeds the text area width and overflows off the screen. Google Search Console raised this as a mobility issue.

    Any css tricks to have the reduced featured image width apply to desktop only?

    serkan
    Moderator

    Hi,
    You can use media quary and you can target the devices with it. Example;

    @media screen and (min-width: 768px) { .single-post .featured-image img { max-width: 740px; } }
    @media screen and (min-width: 768px) { .single-post .layout-fixed { max-width: 1000px; } }

    Thanks

    gkam2
    Participant

    Worked, thank you!

    serkan
    Moderator

    You are welcome :) We’d be very happy if you can spare a minute to rate the theme on ThemeForest. Your feedback will boost our motivation and help us to work harder on future updates.

    https://themeforest.net/downloads

    Thank you for your support.

    gkam2
    Participant

    No problem! Just left a review for you guys. Thanks for the help.

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

You must be logged in and have valid license to reply to this topic.

License required for the following item
Login and Registration Log in · Register