Code Responsible

Skip navigation

CSS :before pseudo elements hack for IE 7


I was recently using the :before pseudo element for icon font. Unfortunately the :before pseudo is not supported in IE 7. The icons weren’t essential to the overall UX of the project but when viewing in IE 7 the HTML elements the icons were associated with were actually hidden from the user because of the lack of support for the :before pseudo element.

After searching around I was able to find a solution that prevented the icons from showing in IE 7 which allowed for the rest of the HTML elements associated with the icon to be displayed.

This is what I added to the class:

I also created a SASS mixin:

41 Posts

Ryan Burgess

Ryan Burgess is a Manager, UI Engineering at Netflix in San Francisco, California. Previously at Evernote. Listen to Ryan on the Front End Happy Hour podcast. He's also the creator of, an online-based arts and culture magazine that focuses on graffiti and tattoo art.

Leave a Reply

Comment Form