1

I have a elements tree that looks similar to this one:

<div class="one">
  <div class="two">
    <div class="three">...</div>
    ::after
  </div>
</div>

Is it possible to select this '::after' element with xpath / css selectors?

Temani Afif
  • 245,468
  • 26
  • 309
  • 415
  • You mean from browser JavaScript? https://stackoverflow.com/questions/38872290/how-to-get-pseudo-element – Ry- Sep 30 '19 at 07:28
  • 1
    please explainn your question proper. other wise for css selector my answer is perfect as you mentioned the structure in html. – KuldipKoradia Sep 30 '19 at 07:53
  • Sorry for being unprecise. Yes, of course I mean selecting this '::after' element from a browser / JS / etc. As I understand it is not possible. Thank you for your answers. – PiotrAcalski Oct 07 '19 at 07:59

1 Answers1

0

.three::after{
  color:red;
  content:"text";
}
<div class="one">
  <div class="two">
    <div class="three"></div>

  </div>
</div>

You can do it like this,

<style>
.three::after{
  //your styles
}
</style>

enter image description here

Preshan Pradeepa
  • 698
  • 14
  • 31