skip to Main Content

I’m trying to increase the bottom padding of my headline in my blog and for some reason it is not being possible.

This is the code that I’m writing to increase the padding:

.post .type-post .entry-content h1.entry-title{
    padding: 0 0 50px;
}

Entry-title and Entry-content are the classes for H1 element.

Here is the link of the page where this issue exist -> https://www.writtenlyhub.com/writing-product-description/

I think this will help you in understand my problem better.

Please do help me out here.

Thanks

2

Answers


  1. Simplest would be to use padding-bottom: 50px;

    While there is nothing wrong in using shorthand, there is a recent video from Kevin Powell explaining some gotchas, I recommend you should watch it and some other videos on his channel.

    Login or Signup to reply.
  2. .post .type-post would select an element with the class type-post, that is a descendant of an element with the class post – but you don’t actually have that in your structure.

    You have one element that has both classes – so the spacing between the two classes in your selector needs to be removed,

    .post.type-post .entry-content h1.entry-title{
        padding: 0 0 50px;
    }
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search