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.

Put title/alt attributes into CSS :after { content: image }?

I’ve got the following CSS to add a PDF icon to any link that links to a PDF: a.…

css title pseudo-element alt
CSS Variables (custom properties) in Pseudo-element "content" Property

Example use (what I want) div::after { content: var(--mouse-x) ' / ' var(--mouse-y); } Test case showing it NOT working: …

css pseudo-element css-variables
Multiple content: attr() values

I'm trying to display 2 things in my elements; the class name and an own created data-size variable. Seperated with one …

html css pseudo-element css-content
Why does a filter gradient on a pseudo element not work in IE8?

I want to create buttons like these: In modern browsers the effect is created using inset box-shadow and filters. For …

html css internet-explorer-8 pseudo-element
Absolute Position Issue with :before pseudo element with IE 11< vs. all other browsers

Please note: Using a separate stylesheet or conditional comments to flag IE11 or less is not an option, so I …

css internet-explorer absolute internet-explorer-11 pseudo-element
how to make text change when you hover over it without it twitching?

As I understand it, CSS can be used to change the content of an element on :hover in a basic …

css hover pseudo-element css-content