1. kpomilla
  2. Commercial Templates
  3. Thursday, 25 September 2014
  4.  Subscribe via email
Hi, I'm using Lifestyle template, and I'm having a problem with the main image for the site. When I view on PC, looks great, but when I view on phone or tablet, the image doesn't resize. How can I fix this?

See the site http://amftestsite.com/sd2

Thanks

Ken
Accepted Answer Pending Moderation
0
Votes
Undo
Hi Ken

As you are using the background for this image I am not sure there is much we can do here. Mobile devices vary greatly when it comes to handling body background images.

A bit of a shot in the dark this but try adding the following to the Custom CSS field of your templates parameters..


@media only screen and (max-width: 1024px) {
body {
background: url("/sd2/images/background.png") no-repeat fixed 50% 0 rgba(0, 0, 0, 0);
}
#body_bg {
background-size: auto auto !important;
background-color: transparent !important;
background-image: none !important;
}}


Ciarán
  1. more than a month ago
  2. Commercial Templates
  3. # 1
Accepted Answer Pending Moderation
0
Votes
Undo
I've added the code to custom css, doesn't work...Is there a way I can simply have the site redirect to a different page if it detects a mobile device?
  1. more than a month ago
  2. Commercial Templates
  3. # 2
Accepted Answer Pending Moderation
0
Votes
Undo
Ciaran,

I've found a solution to my issue...not the prettiest solution, but it works...I added the following custom code to the header section. This code determines if it is a mobile device, and if so, redirects to another page within the site.

<s-cript type="text/j-avascript">
<!--
if (screen.width <= 699) {
document.location = "the-menu";
}
//-->
</script>
  1. more than a month ago
  2. Commercial Templates
  3. # 3
Accepted Answer Pending Moderation
0
Votes
Undo
Great.. thank you for sharing your solution! :)

Ciarán
  1. more than a month ago
  2. Commercial Templates
  3. # 4
  • Page :
  • 1


There are no replies made for this post yet.
Be one of the first to reply to this post!