Remove blank space after removing Blog Post Title in wordpress

  • Unknown's avatar

    Hi everyone:

    I just removed a post title with this code:

    .postid-8421 .entry-title {
    display: none;
    }

    Now I want to remove the blank space left when the title was removed (the space between the header picture and the title HEALING WITH YOGA). Any idea? Thanks!

    You can see the page here to understand what Im talking about : https://schoolyogainstitute.com/blog/healing-with-yoga/

  • Unknown's avatar

    Hello,

    You can remove the margin from the heading container using this code:

    .article-header {
    margin-bottom: 0px !important;
    }

    Hope this helps!

  • Unknown's avatar

    It worked. Thank you so much!

  • Unknown's avatar

    Hi ! So this code worked, but for the entire site:

    .article-header {
    margin-bottom: 0px !important;
    }

    And what I need is only to reduce the space in that specific post. Any idea on how to do this?

    Thanks! :-)

  • Hi there,

    Your site is not hosted on our servers on WordPress.com, and not using one of the themes we make, so our ability to help you here is limited. For help with CSS modifications to your theme, it’s best to contact support for the specific theme you’re using directly.

    As a rule, you should also try to avoid !important, as it will override any existing and future CSS that tries to target the same element.

    To restrict that CSS to only the specific post, it should work to just add .postid-8421 as you did in your original CSS. That’s the piece of the code that tells the browser it should only be applied to that post. In other words:

    .postid-8421 .article-header {
    margin-bottom: 0px !important;
    }

    If that doesn’t work, please contact support for your theme for more help with that.

  • Unknown's avatar

    Perfect. Thank you so much!

  • The topic ‘Remove blank space after removing Blog Post Title in wordpress’ is closed to new replies.