0

Everytime I make any modification on H2,3,4 headings to change their background or so, when I change "display: block;" into "display: inline-block;" or "display: table; I find the first and second H2 in every post is wrongly placed to the right as in the attached image, while the rest of h2 headings are positioned normally to the left.

I tried many solutions without any results.

.post-body h2 {
    background-color: #f2f2f2;
    (post.line);
    padding: 10px 20px;
    color: $(post.headline);
    display: block;
    margin: 5px 0 15px;
    border-bottom: 1px solid $(post.line)
}

.post-body h3, .post-body h4 {
    background-color: #fff;
    (post.line);
    padding: 10px 20px;
    color: $(post.headline);
    display: block;
    margin: 5px 0 15px;
    border-bottom: 1px solid $(post.line)
}

Faulty first, second and/or 3rd heading.

Oleg
  • 6,124
  • 2
  • 23
  • 40
  • Please add the html code – Oleg May 22 '19 at 07:48
  • If you change the display to `inline-block` it is only to be expected that the display of the element changes. What do you want to achieve and why are you changing the display property? – cloned May 22 '19 at 08:17
  • I just want to make the background confined to the H2,3text like this:https://www.ahlteb.com/2019/05/fasting-blood-sugar-diabetes-diagnosis.html but NOT like this https://www.med2date.com/2019/05/surgical-operations-nose-sinuses.html – user3037905 May 26 '19 at 17:51

0 Answers0