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!

Join Our Newsletter

* indicates required
We respect your privacy and do not tolerate spam and will never sell, rent, lease or give away your information (name, email, number, etc.) to any third party. Nor will we send you unsolicited email.
Joomla51 - Mullaghmore, Co. Sligo, Ireland
Joomla51.com is not affiliated with or endorsed by the Joomla! Project or Open Source Matters.
The Joomla! name and logo is used under a limited license granted by
Open Source Matters
the trademark holder in the United States and other countries.

We use cookies on our website. Some of them are essential for the operation of the site, while others help us to improve this site and the user experience (tracking cookies). You can decide for yourself whether you want to allow cookies or not. Please note that if you reject them, you may not be able to use all the functionalities of the site.

Ok