I would like to use a switch for the layout of paragraph tags on a webpage.
I use the after pseudoelement:
p:after {content: url(\"../img/paragraph.g
As mentioned in Gillian's answer, assigning none
to content
solves the problem:
p::after {
content: none;
}
Note that in CSS3, W3C recommended to use two colons (::
) for pseudo-elements like ::before
or ::after
.
From the MDN web doc on Pseudo-elements:
Note: As a rule, double colons (
::
) should be used instead of a single colon (:
). This distinguishes pseudo-classes from pseudo-elements. However, since this distinction was not present in older versions of the W3C spec, most browsers support both syntaxes for the sake of compatibility. Note that::selection
must always start with double colons (::
).
p:after {
content: none;
}
This is a way to remove the :after
and you can do the same for :before