Skip to main content

All Questions

0 votes
1 answer
732 views

How do I override the CSS content property of a pseudo ::before/::after element?

This question is not a duplicate, though it might appear so to someone not reading very carefully. This is not a question about CSS specificity, nor is it about the !important directive (I don't think)...
Eric Hepperle - CodeSlayer2010's user avatar
0 votes
1 answer
278 views

Using regular expression in CSS pseudo element

Not sure this is possible with CSS only, can the content of a pseudo selector contain a regular expression? In this scenario: .normal-class::before { /*content: attr(class); => this works, ...
prettyInPink's user avatar
  • 3,438
1 vote
2 answers
111 views

Is the height of a picture that is inserted by ::before or ::after controllable? [duplicate]

I used ::before or ::after to insert a picture. The code in CSS is like this: p::before { content: url(../image/xs.jpg); } or p::after { content: url(../image/submit.png); } When I inspect ...
uoay's user avatar
  • 326
0 votes
1 answer
311 views

Using css pseudo element in php doesn´t work

My issue is that I had to add in php the tag in order to put there some styles with pseudo element span: before and a content: 'text' in which I have a translation for serveral languages. Of course, ...
cperezsola's user avatar
1 vote
1 answer
2k views

Google Chrome Dev Tools remove element's :after from DOM when :after display is none

My problem is about Google Chrome Dev Tools when I want to set display: none; to an after in DOM for a moment but Chrome remove all afters elements from DOM and I can't access to them again. My Chrome ...
nyn05's user avatar
  • 560
89 votes
2 answers
5k views

Why are double quotes shown only for the first element?

I am wondering why the browser shows double open quotes only for the first element. The second element has single quotes instead. a::before { content: open-quote; } <a href="http://www....
Pavan Tiwari's user avatar
  • 3,207
1 vote
3 answers
103 views

Different content for each "::before" pseudo-element

How can we give different content to each ::before pseudo-element? My code looks like this: .timeline h1::before { position: absolute; font-size: inherit; left: 0; } .timeline h1:...
Shabrina Fitri's user avatar
2 votes
1 answer
637 views

Children :before content inheritance

The title might be a little bit confusing but I wonder why is it impossible for a child element to inherit it's parent ::before content. for example: HTML: <div class="foo"> <div class="...
user avatar
3 votes
1 answer
1k views

How could a web spider crawl the content in ::before?

The content in a pseudo element such as ::before or ::after actually not exists in the DOM tree. So, It's impossible to locate it by selector. The question is, how could I extract the content in it? ...
Sraw's user avatar
  • 20.3k
0 votes
1 answer
484 views

Making content appear below the :before pseudo selector?

I have an element <div class="Test_then">The result is ...</div> The Test_then class looks like this: .Test_then::before { content: 'Then'; } My goal is to have the (The result is ...) ...
Ole's user avatar
  • 47.6k
10 votes
4 answers
15k views

Div with CSS content, after pseudo element is not visible

I have a POC that I have to complete and I am only allowed to use CSS to update the styles of a product. I have replaced one of the images of the product with a logo by using the CSS content ...
ICodeGorilla's user avatar
0 votes
2 answers
99 views

Semantic way of stacking two characters in a ::before element?

I'm trying to add checklist symbols to the left edge of table cells. So far, this does work. When I'm trying to stack another char on top of the checklist symbol though, things get ugly. I have found ...
Tatjana Heuser's user avatar
0 votes
2 answers
961 views

Changing content of the <title> element with pseudo-element

What i want To change contents of html 'title' element by selecting it via '::before' pseudo-element and applying 'content' attribute to selection. Problem I have a webpage: <html> <head> ...
Petteri Knihti's user avatar
0 votes
1 answer
2k views

CSS selector and content property to add a space character between two inline-block elements

I have a series of span elements of class tag (from bootstrap v4) which are adjacent to each other without any space between them because they come from a reacj.js array of JSX elements : <span ...
beeb's user avatar
  • 1,217
4 votes
1 answer
308 views

Find a text generated by "content" CSS property [duplicate]

https://jsfiddle.net/2gf6gq0s/ I use ::after pseudo-element to insert text in my document: <div class="foo"></div> <div>test</div> <style> .foo::after { content: "...
john c. j.'s user avatar
  • 1,205

15 30 50 per page
1
2 3 4 5 6
X