• Hello,
    with classic editor all gallery’s alignments are good.

    But with new Gutenberg:

    • The large gallery’s alignment isn’t also good! (not align on featured-image)
    • Ditto with a series of galleries, the vertical and horizontal alignment is different

    Other sizes and alignments are good with Gutenberg!

    Thanks

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

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter vent

    (@ventair)

    I found a solution beginning with the class css aditional gallery and the default block width.
    Alignment and vertical and horizontal margins are good!

    Maybe this could be automatic with the wide setting?

    I have this in my CSS for consecutive galleries with Hamilton and Gutenberg

    .wp-block-gallery + .wp-block-gallery {
        margin-top: -50px;
    }
    Thread Starter vent

    (@ventair)

    Thanks, it works good for consecutive galleries, but break the good space if the block are “gallery” in custom css of block…

    To solve this problem,ideally, all gutenberg blocks have the width of the featured image when they are set to wide.

    Thread Starter vent

    (@ventair)

    I try:

    .entry-content .alignwide {
        margin-left: calc( 50% - 620px );
        max-width: 1240px;
        width: 1240px;
    }
    .wp-block-gallery + .wp-block-gallery {
        margin-top: -50px;
    }
    
    @media ( max-width: 1380px ) {
    
    .entry-content .alignwide {
    		margin-left: calc( 50% - 45vw );
    		width: calc( 90vw);
    	}
    }
    @media ( max-width: 620px ) {
    .wp-block-gallery + .wp-block-gallery {
        margin-top: -45px;
    }
    }

    The look of the galleries is better, but not yet optimal on mobile …
    Blocks set to wide look to line up on the featured image!
    A code of this type revised and corrected, can it be integrated in the original css of the theme?

    Thanks Seindal for the answer and Anders for the super themes!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Gallery alignement with Gutenberg Bloc’ is closed to new replies.