Page 1 of 1

Image based on Screen Size

Posted: Tue Nov 03, 2015 4:13 am
by Mike6979865

Hi,

I want to have a different background image based on the screen size so it will look perfect as a background image. I create an image component, and I added the following code to CSS:

@media screen and (max-width: 310px) {
{
.yourClass {
content:url("http://www.samsung-wallpapers.com/upl...");
}
}

@media screen and (max-width: 310px) {
.yourClass {
content:url("http://www.samsung-wallpapers.com/upl...);
}
}

I also entered the class name for the image component. This doesn't seem to be working. Please help. I want to have a background image that will work on all devices. Please help...


Image based on Screen Size

Posted: Tue Nov 03, 2015 3:23 pm
by Mike6979865

Please help... You assistance is highly needed.


Image based on Screen Size

Posted: Tue Nov 03, 2015 6:22 pm
by Mike6979865

Resolved!


Image based on Screen Size

Posted: Tue Nov 03, 2015 6:26 pm
by Serhii Kulibaba

Hello Mike,

Please use property "background-image", instead of "content"