Change the homepage background photo on mobile devices

aribixaribix SeattleRegistered Users Posts: 1 Beginner grinner
Hey everyone - Long-time reader, first-time poster. I'm trying to to show a different homepage photo when someone visits my site from a smartphone, but can't get it to work.

Currently, I show this photo as my homepage background:
When someone visits from a smartphone, I want to instead show this photo:

In the theme's CSS, I've tried two different methods to change this photo when someone visits from a mobile device.

Attempt 1:
@media only screen and (max-width: 640px)
{ { content:url(""); }

Attempt 2:
@media only screen and (max-width: 640px)
{ { display:none; } { background:url(""); }

No luck either way. Any thoughts appreciated.


Sign In or Register to comment.