Page BG image not scaling

Page BG image not scaling was created by trogladyte

Posted 6 years 8 months ago #44319
I've assigned a 2200px wide image as my page BG, and set page BG color to black. However, on phones, the image displays still (I'd expected it to fall back to the solid color by default). And it displays only a small portion - it isn't scaling as I would expect.

I'm hoping someone has an answer seeing as Ced is away.

www.baysauto.com/

A good landing is one you can walk away from.
A great landing is one where you can reuse the aircraft!

Attachments:

Please Log in or Create an account to join the conversation.

Replied by Boradan on topic Page BG image not scaling

Posted 6 years 8 months ago #44320
in the custom css for that box, do:
Code:
background-size:100% 100%;

Of course, thats IF you want it at that scale - some images look odd when the same one is used on a desktop and a mobile/tablet in portrait view due to it being 'squished'.
What you can also do is use separate images for smaller devices.

To do this:
In responsive design, in the custom CSS box for each resolution use the following code:
Code:
body{ background-image:url('../images/image1.jpg'); }
(of course replacing 'image1' with the name of the image(s) you use)
You then should use the custom images (under parameters>custom images) to include the new images in the template folder.
Last Edit:6 years 8 months ago by Boradan
Last edit: 6 years 8 months ago by Boradan.

Please Log in or Create an account to join the conversation.

Replied by trogladyte on topic Page BG image not scaling

Posted 6 years 8 months ago #44321
Thanks, Boradan, but neither seemed to have any effect on the site in mobile. I did make a new image for mobile (for the second alternative), but nothing happened. Same old, same old.

A good landing is one you can walk away from.
A great landing is one where you can reuse the aircraft!

Last Edit:6 years 8 months ago by trogladyte
Last edit: 6 years 8 months ago by trogladyte.

Please Log in or Create an account to join the conversation.

Replied by Boradan on topic Page BG image not scaling

Posted 6 years 8 months ago #44322
site link?
by Boradan

Please Log in or Create an account to join the conversation.

Replied by trogladyte on topic Page BG image not scaling

Posted 6 years 8 months ago #44323

A good landing is one you can walk away from.
A great landing is one where you can reuse the aircraft!

Please Log in or Create an account to join the conversation.

Replied by Boradan on topic Page BG image not scaling

Posted 6 years 8 months ago #44324
Not going to be a hell of a lot that you can do with that image to be honest as far as rescaling goes due to the nature of it.
Have a look at the site here: ismysiteresponsive.com/ to see what I mean.
Removing the image altogether in smaller devices would be best:
Use this in the responsive layouts for the ones where is totally sucks:
Code:
body{ background-image: none; }

Even the original image in desktop view (I am using 1920x1080) does not look great.
Personally, I would crop the image down to suit that resolution more (there is a lot of wasted space at the top of the image that could be cut out.)
I would also change it to 'fixed' instead of 'scroll' as currently, the ONLY reason there is a vertical scroll is to see the bottom of the image on the main site.
(I assume the reason for :
Code:
#left > div.inner { height: calc(100vh + 400px); }
is to see the full picture?

What is the vertical menu extension you are using?
Last Edit:6 years 8 months ago by Boradan
Last edit: 6 years 8 months ago by Boradan.

Please Log in or Create an account to join the conversation.

Time to create page: 0.689 seconds

Fast and powerful creation, customizable and responsive.

Read More

We have 291 guests and one member online