Answer the question
In order to leave comments, you need to log in
::after Appears after the text in the div and not after the div - is that how it's supposed to be?
The solution with top:100% and relative works, but is ::after supposed to behave like this, because it is specified that it is a block element and its behavior is very strange.
Code link: jsfiddle.net/n175tvrv/2
Answer the question
In order to leave comments, you need to log in
The ':before' and ':after' pseudo-elements can be used to insert generated content before or after an element's content . They are explained in the section on generated text .Specification
The afterter is added to the end of the element before the closing tag, the before - before the tag.
If you want to add a letter, set pseudo-elements to type "inline".
If you want to add a block - put block.
If it's an element outside the block, add an absolute and move top: left:
Remember that the disadvantage of absolutes is that when you make a responsive site, they will remain absolutes, which in responsive design will often cause problems if done illiterately.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question