2

As i am working in email templates, i added a class like this in my email template.

img {
  display: inline-block;
  vertical-align: middle;
  max-height: 100%;
  max-width: 100%;
  pointer-events: none;
}

but when I open the mail in the inbox. It automatically removes pointer-events in the css class.

img {
  display: inline-block;
  vertical-align: middle;
  max-height: 100%;
  max-width: 100%;
}

like this. Is there any solution or workaround for this?

1

1 Answer 1

-3

As it seems the pointers-events property is not supported, you may use z-index property. Something like this:

.container {
   position: relative;
   z-index: 0;
   background: none;
}
.container > * {
   position: relative;
   z-index: -1;
}

This makes content visible, but not clickable, because parent div is on top layer.

Copied answer from here: stackoverflow.com/a/39851786/34092

3
  • yeah thanks for your answer. but i could able to do that by applying it as background image. which makes it as non-clickable. anyways I think your answer suits more than mine. Commented Nov 24, 2017 at 6:59
  • 1
    Please be explicit that this is a straight copy of stackoverflow.com/a/39851786/34092 .
    – mjwills
    Commented Nov 22, 2020 at 22:44
  • I straight copied. @mjwills
    – BennKingy
    Commented Mar 3, 2023 at 15:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.