• Resolved databell96

    (@databell96)


    I like the cover image block a lot but I’m surprised I can’t vertically align it to top and bottom and only the middle. Is there some way in the CSS to do this? Or some other way?

Viewing 1 replies (of 1 total)
  • You can use this to align all Cover blocks to the bottom:

    /* Align Cover block content to bottom */
     
    .wp-block-cover__inner-container {
      align-self:end;
    }

    Or to the top:

    /* Align Cover block content to top */
     
    .wp-block-cover__inner-container {
      align-self:start;
    }

    This will target all blocks on the site, you can make it more specific by adding a custom CSS class to the Cover block and using this CSS (your-custom-class being your custom class):

    /* Align Cover block content to bottom */
     
    .your-custom-class .wp-block-cover__inner-container {
      align-self:end;
    }
    • This reply was modified 5 years, 5 months ago by mikeicode.
Viewing 1 replies (of 1 total)
  • The topic ‘Vertically aligning text to the bottom of a Cover Image Block?’ is closed to new replies.