Skip to content

Instantly share code, notes, and snippets.

@johanneslumpe
Created April 11, 2014 07:26
Show Gist options
  • Save johanneslumpe/10446664 to your computer and use it in GitHub Desktop.
Save johanneslumpe/10446664 to your computer and use it in GitHub Desktop.
Triggering pseudo-element changes on hover in IE
.container {
background: #f00;
width:50px;
height: 50px;
}
.container:before {
content: " ";
display: block;
background:#fff;
height:10px;
width:10px;
}
.container:hover {
/* fix the hover state of the :before element for ie */
position:static;
}
.container:hover:before {
background:#0f0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment