Can’t add custom CSS to WordPress cover block

  • Hello! I need to add some custom CSS to a cover block I am using in my site to make it responsive in the mobile version. However, when I try to target it my using a custom CSS class it is not affected. My goal is to make the cover, which has a parallax effect have less height in the mobile version. Here is my code:

    @media only screen and (max-width: 767px) {
    .block-cover{
    max-height: 50px;
    }}

    The custom CSS changes under “media only screen” are working on other blocks, but I can’t seem to make it work for the cover block.

    Thank you in advance!

    The blog I need help with is: (visible only to logged in users)

  • Hello!

    I suggest that you try changing the block’s CSS class by following this guide.

    Please note, WordPress.com does not offer direct support for writing or editing CSS. You can visit About CSS to learn more about writing CSS, or you may wish to consider hiring a developer or designer. We recommend the WordPress experts available at the freelancer network called Codeable.

Reply to Can’t add custom CSS to WordPress cover block