lucy24 - 3:59 am on Oct 23, 2013 (gmt 0)
To me, that implies that any <div> in the body will have the div:after properties assigned to it.
Yes, that's right. He just did it that way for demo purposes. As swa66 said,
I think it's better to write .test:after instead of div:after . The first will add a pseudo element after any element that has a class of test, the latter will do it after every div in your document.
What you need to do is take the test code-- the part that currently says
and change it to either
replacing "test" with the name of the actual div.
If you expand the sample to this
border: 1px dotted blue;
border: 2px dashed #2D72C2;
<div class="foobar">IE8+ (+ other modern browsers) only</div>
<div class="test foobar">IE8+ (+ other modern browsers) only</div>
you'll get a better sense of what's happening where.
The part I'm having trouble with is: How do you get it to work with a div that is not relatively (or absolutely) positioned?