I have not tested your example in IE, but I know there are server-side ways you could make this work in all browsers.
I always avoid before and after with the layout, since they have problems with the cross browser, it may not be your current stop show, but in any case, the before and after is not really for placing IMHO.
I did something similar a few months ago:
[[box, box, box] [overlay, overlay, overlay]]: two holders have an absolute position, top and left = 0, overlay z-index holder: 1.
[[box, overlay] [box, overlay] [box, overlay]]: the fields are relative and the overlays are absolute. All overlay sizes are defined and defined by z-index 1.
The key is to keep it clean, you really don't need more than three levels in this scenario, you just need to place and set the layers correctly.
Animated paragraphs will be clean with jQuery, but I would prefer a different animation library like GSAP. But if you must initially, and if you can afford to skip the animation using IE8, then you basically set CSS3 transitions and use something like .classList to switch the class http://jsfiddle.net/davidThomas/Tpz86/
function classToggle() { this.classList.toggle('class1'); this.classList.toggle('class2'); } document.querySelector('#div').addEventListener('click', classToggle);
source share