Top "Pseudo-element" questions

CSS pseudo-elements allow for an enhanced display of content within elements or the ability to generate extra beginning or ending content for elements.

Change SVG fill color in :before or :after CSS

I have a SVG graphic put like this: a::before { content: url(filename.svg); } When I hover over the tag, …

javascript jquery css svg pseudo-element
CSS :before on inline SVG

Update Thanks porneL for pointing out the relation between generated content and replaced elements. I found this article which deals …

css html svg pseudo-element
Event listener on a CSS pseudo-element, such as ::after and ::before?

I have a div element with a CSS pseudo-element ::before used as a close button (instead of using an actual …

javascript css pseudo-element
css form checkbox styling with checked and after tags

I am trying to design a form without using JavaScript or JQuery. It includes a series of checkboxes. The idea …

css cross-browser pseudo-element css-content
Adding CSS class on pseudo-element

I was wondering if there's a way to add a CSS class to pseudo-elements, such as :after. I want to …

css pseudo-element
“text-decoration” and the “:after” pseudo-element, revisited

I'm re-asking this question because its answers didn't work in my case. In my stylesheet for printed media I want …

css cross-browser pseudo-element
Adding box-shadow to a :after pseudo element

I have a div called .testimonial-inner and using the :after pseudo element I have an arrow that sits underneath it …

html css pseudo-element css-shapes
CSS: before / after content with title

I can do div:after { content: "hello" } But can I have the hello text with a title so that when …

css title pseudo-element
Can I make the CSS :after pseudo element append content outside the element?

I want to format a breadcrumb trail of links using an HTML » entity between adjacent links, so it …

html css css-selectors pseudo-element
How to remove only underline from a:before?

I have a set of styled links using the :before to apply an arrow. It looks good in all browser, …

html css hyperlink pseudo-element text-decorations