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!