Global image alignment in blog body text

Home Forums Gillion Theme Global image alignment in blog body text

Home Forums Gillion Theme Global image alignment in blog body text

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    RESOLVED Posts
  • Hi,

    after we migrated to this theme, most of the blogpost images are smaller than the blog width and we want them all center-aligned. What is the proper way to do it in child-theme css?

    Hi @bliksa,

     

    I hope you are well today and thank you for your question.

     

    Could you please share me the page URL from your site where it is displaying so that i can help you to centre align it?

     

    Best regards,
    Shufflehound team

    bliksa
    Participant

    ..for example here: http://gaudeo.sk/pyramidy-v-bosne/

     

    We need to center align everything in post except body text (images, videos, embeds and iframes).

    Solution for this topic

    You can achieve it by adding the following CSS code in the Custom CSS code option of your theme on the below path.

     

    Admin Area -> Appearance -> Theme Settings -> Custom Code -> CSS Code

     

    #page-container article .post-content img{
        margin: 0 auto;
        display: table;
    }
    article .post-content iframe,
    article .post-content .wp-caption {
        margin: 0 auto 1.5em;
    }
    

    bliksa
    Participant

    Awesome, thank you! Is there also any way to format video embeds that are automaticaly generated when link is detected in post body? We just need them to be stretched (justified) to fill 100% width of the post while maintaining proportional height.

    Is there also any way to format video embeds that are automaticaly generated when link is detected in post body? We just need them to be stretched (justified) to fill 100% width of the post while maintaining proportional height.

    To achieve this, you can try using the solution posted in the following page.

     

    https://cantonbecker.com/etcetera/2011/how-to-change-automatic-wordpress-youtube-embed-size-width/

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