Home > Software design >  Remove "::before" — CSS
Remove "::before" — CSS

Time:02-14

enter image description here Currently heading of my blogpost on blogger looks like this. So I wanted to remove this "-" like looking element from my blog, which is a ::before. I tried this advice here and used a little ingenuity to added a CSS like so:

div.post-body-container::before{
    content: none;
}

And some other variations of the same. Where am I going wrong here?
This is my blog btw if it is needed on which I'm using Soho Neon theme.

CodePudding user response:

Try using content: '' instead.

div.post-body-container::before {
  content: '';
}

CodePudding user response:

You are using a least specified selector.

In your CSS, the selector used to add the "-" is body.item-view .post-body-container::before, so with only div.post-body-container::before you will not be able to modify the rule.

You must use a more specific selector or remove it with a different rule (aka display: none).

PS: the same selector placed after will do it

body.item-view .post-body-container::before {
    content: none;
}

/* or */

.post-body-container::before {
    display: none;
}
  • Related