IE8 lightbox background

From snippet wiki
Jump to navigation Jump to search

To get a functional lightbox background even with a non browser like the IE8 you can't just define a background color. You have to define a filter which only works in this IE8 version.

But using a filter you loose the ability to click on that element, meaning you will never be able to close the lightbox by clicking on the background. You have to define a dummy background image to regain the clickability.

#lbkontakt {
  background: url(#);
  cursor: pointer;
  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#bf595959,endColorstr=#bf595959);
}