I'm currently working on an email design where I want to display one image only when the email is viewed on a mobile device, and another image when viewed on a desktop.
I've managed to hide the desktop image when viewed on mobile using CSS, but now I need help figuring out how to achieve the same effect in reverse.
If anyone has any suggestions or solutions, I would greatly appreciate it.
Here is the CSS code that I am currently using:
@media screen and (max-width: 600px) {
.img-max {
width: 100% !important;
max-width: 100% !important;
height: auto !important;
}
.max-width {
max-width: 100% !important;
}
.mobile-wrapper {
width: 85% !important;
max-width: 85% !important;
}
.mobile-padding {
padding-left: 5% !important;
padding-right: 5% !important;
}
/* USE THESE CLASSES TO HIDE CONTENT ON MOBILE */
.mobile-hide {
display: none !important;
}
.mobile-show {
display: block !important;
}
}
And here is the HTML code for displaying the images:
<img class="mobile-show" border="0" height="50" src="images/logo.svg" style="display: block;" width="250">
<img class="mobile-hide" border="0" height="50" src="images/logo.svg" style="display: inline;" width="100">