• hbee

    (@heatherbodlak)


    Hello,

    I am trying to figure out why the following is happening:

    I am using the default template for Blog entries, and the text and featured image appear just fine, centerd on the page, with margins on either side. But if I create a Gallery and insert it, it extends full width, breaking the layout. It doesn’t line up with the entry content, it doesn’t have the same margins to the left and right.

    Example here (we used FooGallery to try and make it more presentable, but you can still see that it extends to be full width, when I’d like it to align with the Blog content:

    https://axober.org/axober-na-feira-de-emprego-45en-carballo/

    Any help appreciated.

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hello @heatherbodlak,

    Thank you for reaching out,

    Please put the CSS below in Customizing > Custom CSS/JS > CSS Code:

    .single .entry-content .foogallery {
        max-width: 1100px;
        margin: 0 auto;
    }

    Please read this link for more information about the CSS/JS code on the customizer: https://docs.oceanwp.org/article/354-add-custom-css-and-js-to-your-website.

    Note: If you have any cache plugin or server cache(CDN / Browser Cache and Cookies and …), you need to clear its cache contents or disable them to see your changes. Also, remember to click on the regenerate all assets file and data in Elementor > Tools(if you have Elementor).

    I hope that helps.
    Best Regards

    Thread Starter hbee

    (@heatherbodlak)

    Hi, yes, that works, thanks! But is there a way to apply that to the regualr WordPress Galleries too?

    —-

    edited to add: I think i figured it out, same CSS as you provided, but for .gallery

    .gallery {
    max-width: 1100px;
    margin: 0 auto;
    }

    Thanks again.

    • This reply was modified 1 year, 4 months ago by hbee.

    Hello @heatherbodlak,

    Thank you for reaching out,

    If you created a single post with the Gutenberg editor, placing all items on the page without wrapping them in a container might cause this issue. Then you would need to write custom CSS to fix it.

    To prevent this issue, place your desired content inside a section or column to maintain the content wrapper.https://ibb.co/N6kjQf7

    Best Regards

    Thread Starter hbee

    (@heatherbodlak)

    ah yes, that makes sense I’m afraid we are using “classic editor” though, so that’s probably the problem.

    Unfortunately I can’t switch to Gutenberg because the people who update the blog would be very confused 😅. They are too used to the classic editor.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘WordPress Image Galleries width’ is closed to new replies.