Mike6979865
Posts: 0
Joined: Fri Jul 11, 2014 3:53 pm

Image based on Screen Size

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...

Mike6979865
Posts: 0
Joined: Fri Jul 11, 2014 3:53 pm

Image based on Screen Size

Please help... You assistance is highly needed.

Mike6979865
Posts: 0
Joined: Fri Jul 11, 2014 3:53 pm

Image based on Screen Size

Resolved!

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

Image based on Screen Size

Hello Mike,

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

Return to “Issues”