arch
arch

Reputation: 471

Lining Up Pseudo Elements with Parent edge

What I want to do is line up the after pseudo element, in this fiddle http://jsfiddle.net/RqQyh/ , with the right edge of the parent element. If I set right: auto; then it lines it up with the right edge of the content. I can't use margins because if I do, then when I have multiple headers with different text, the after elements are all out of alignment.

Can anyone help me and line up the after element with the right edge of the parent element?

Upvotes: 2

Views: 198

Answers (1)

Adrift
Adrift

Reputation: 59819

If you're just trying to align the ::after pseudo-element to the right border-edge of the containing div, you can give <div class="stepHeader"> a relative position so that the pseudo-elements are relative to their container:

http://jsfiddle.net/RqQyh/2/

Upvotes: 2

Related Questions