Skip to content

Instantly share code, notes, and snippets.

@cscuderi
Created January 3, 2014 18:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cscuderi/8243184 to your computer and use it in GitHub Desktop.
Save cscuderi/8243184 to your computer and use it in GitHub Desktop.
Adds support for :before and :after (in the form of .before and .after classes) to IE7. Use with Modernizr.
.lt-ie8 .class-selector {
*zoom: expression(
this.runtimeStyle.zoom="1",
this.insertBefore(
document.createElement("div"),
this.childNodes[0]
).className="before",
this.appendChild(
document.createElement("div")
).className="after"
);
}
.tabs:before,
.tabs .before {
/* Styles */
}
.tabs:after,
.tabs .after {
/* Styles */
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment