Most voted "pseudo-elements" questions
Just like pseudo-classes, pseudo-elements are added to selectors but instead of describing a special state, they allow you to apply styles to certain parts of a document. For example, the pseudo-element`::first-line` applies the style only in the first line of the specified element skin selector.
Learn more…10 questions
Sort by count of
-
12
votes1
answer3245
viewsPseudo elements ::after and ::before work on which input types
I wonder if there is any documentation or article that says where exactly we can use ::after and ::before I’ve seen that tag <img> for example does not work. I believe it does not work because…
-
7
votes2
answers2249
viewsWhat is the purpose of the pseudo-elements "::before" and "::after"?
I find many codes that use these pseudo-elements and I "fly" when I see them. The few tutorials I found on the Internet did not explain clearly and I was left with more doubts. After all, what is…
-
4
votes2
answers855
viewsHow to break line in Pseudo Content element ::after or ::before?
Is there any way to break the line of a text that is in content of a pseudo element type o ::after or the ::before ? Whereas something like this: content: "<br> não quebra?"; or this content:…
-
3
votes1
answer50
viewsHow can I use pseudo css elements
Following a css3 tutorial, I learned how to place icone inside inputs. The dev I was teaching used an example of 2 inputs to put 2 icons 1 in each input. In this case it used the following pseudo…
-
1
votes1
answer122
viewsThe target of CSS selectors with pseudo-element ::before
Hello, I’m studying CSS3 and, in a given tutorial, I analyzed it all, and did not understand the point where the ::before was used together with the checkbox, in which the property was added…
-
1
votes1
answer23
viewsBug when using pseudo-element after on small screens
Hello, a curious bug appeared when I tried to make a text with this effect: The problem is in smaller screens, the second effect in the text "adipiscing Elit!" simply add up, depending on the size…
-
1
votes2
answers55
viewsMake a background photo opaque/darken. Should I use pseudo element ::after?
I need to darken/or render opaque a background photo in the html header. I tried to use ::after in relative position by applying a rgba, but it is not working. What solution could I give in this…
-
0
votes1
answer43
viewsAligns pseudo element to direct in the navigation bar
I’m having a hard time aligning the :before bar on the right. Can anyone help me with that? I’m using this code: .nav-romeu li:before { content: ''; width: 50px; height: 2px; background: #000;…
-
0
votes1
answer95
viewsPrevent the pseudo element ::before from receiving the effects of Hover applied to its parent
Hello, I’m applying Hover to an element, and this one contains a pseudo element before, in which it is receiving the effects of Hover of his parent element. This image shows the problem: Note that…
-
0
votes1
answer34
viewsUse of pseudo-elements ::after in a DIV simulating an INPUT with LABEL - Pseudo-element overwrites the cursor. How to do not overwrite the cursor?
I created an editable DIV by simulating an INPUT with a LABEL using the pseudo-element ::after and the pseudo-class :Empty. LABEL (which is actually a pseudo-element ::after with the content equal…