I have a customized email template with a background image. The size of the image is 600px (width), and I have applied a class called back-img for styling purposes. I am looking to override this class specifically for all mobile screen sizes, including landscape and portrait orientations, especially on newer iPhones. Can anyone guide me on how to achieve this?
Responsive Design Solution
<style>
@media only screen and (min-device-width: 414px)and (max-device-width: 550px) {
.back-img {
background: url(https://img.techpowerup.org/200601/cbanners.jpg) repeat-x !important;
background-size: contain !important;
background-repeat: no-repeat !important;
height: 450px !important;
}
}
@media only screen and (min-device-width: 375px) and (max-device-width: 413px) {
.back-img {
background: url(https://img.techpowerup.org/200601/cbanners.jpg) repeat-x !important;
background-size: contain !important;
background-repeat: no-repeat !important;
height: 375px !important;
}
}
@media screen and (min-device-width: 320px) and (max-device-width: 374px) {
.back-img {
background: url(https://img.techpowerup.org/200601/cbanners.jpg) repeat-x !important;
background-size: contain !important;
background-repeat: no-repeat !important;
height: 320px !important;
}
}
</style>