← Back to context Comment by dalmo3 11 days ago Try ::before and css-counters. 2 comments dalmo3 Reply sollniss 10 days ago ::before has the same problem. You can't align text inside `content:` to the right. Probably because each ::before is handled separately and can't see the sibling's content length. dalmo3 9 days ago Ah, I only now opened your example code.If you wrap the li contents in a div, you can handle them as a unit separately from ::before.Then subgrid solves the problem of treating nested elements as siblings.https://jsfiddle.net/3617wdmf/1/
sollniss 10 days ago ::before has the same problem. You can't align text inside `content:` to the right. Probably because each ::before is handled separately and can't see the sibling's content length. dalmo3 9 days ago Ah, I only now opened your example code.If you wrap the li contents in a div, you can handle them as a unit separately from ::before.Then subgrid solves the problem of treating nested elements as siblings.https://jsfiddle.net/3617wdmf/1/
dalmo3 9 days ago Ah, I only now opened your example code.If you wrap the li contents in a div, you can handle them as a unit separately from ::before.Then subgrid solves the problem of treating nested elements as siblings.https://jsfiddle.net/3617wdmf/1/
::before has the same problem. You can't align text inside `content:` to the right. Probably because each ::before is handled separately and can't see the sibling's content length.
Ah, I only now opened your example code.
If you wrap the li contents in a div, you can handle them as a unit separately from ::before.
Then subgrid solves the problem of treating nested elements as siblings.
https://jsfiddle.net/3617wdmf/1/