0

I am working on spacing some elements evenly across the screen, and need to be able to set the element's width, but also the length of the ::after pseudoelement on a child. The width of the element is fairly trivial with:

ng-style="{'width': 100/numOfElements + '%'}"

However, the child element's ::after pseudoelement is basically unreachable. It needs a similar rule, but I can't seem to set it from what I've found online so far.

Katherine1
  • 195
  • 1
  • 2
  • 14
  • It's not really clear what you are trying to do. Questions seeking code help must include the shortest code necessary to reproduce it **in the question itself** preferably in a [**Stack Snippet**](https://blog.stackoverflow.com/2014/09/introducing-runnable-javascript-css-and-html-code-snippets/). See [**How to create a Minimal, Complete, and Verifiable example**](http://stackoverflow.com/help/mcve) – Paulie_D Sep 20 '17 at 19:46
  • Try using js. on `numOfElements` change, modify `::after`'s width – Rahul Jain Sep 20 '17 at 19:48
  • I don't see this as a duplicate of that answer - so if you want inline styles it's hackish but you could put somewhere before/after element, then remove that ng-style and put instead of it class="yourclass" on your element. – pegla Sep 20 '17 at 19:53

0 Answers0