- This topic has 9 replies, 2 voices, and was last updated 3 years, 6 months ago by Elvin.
-
AuthorPosts
-
October 13, 2020 at 1:17 pm #1487439Sapir
I set a background image at homepage to 40% size.
I liked the size at mobile, but at desktop It’s gigantic.How can I set the size to 20% at desktop only, while keeping it 40% at mobile?
I tried the method written here. Nothing happend.
October 13, 2020 at 1:51 pm #1487484ElvinStaffCustomer SupportHi,
You can try this CSS:
/* Background size CSS for Desktop and Tablet */ @media (min-width:769px){ .gb-container.gb-container-b58db5b2:before{ background-size: 20%; } } /* Background size CSS for Mobile */ @media (max-width:768px){ .gb-container.gb-container-b58db5b2:before{ background-size: 40%; } }
October 13, 2020 at 2:21 pm #1487539SapirHi Elvin, it worked.
But there is something else.
The picture size stays the same, while the screen resolution changes.
In my computer, which is connected to a 50″ 4K television, I see the image lower than my other computer who is connected to my 27″. My laptop 15.7″ shows kind of both, but is still stable.In this case, the structure might break for some users who watch from differenet devices?
October 13, 2020 at 2:42 pm #1487550ElvinStaffCustomer SupportIn this case, the structure might break for some users who watch from differenet devices?
Ideally, when we create sites, the assets(images & graphics) for different viewports are prepared for their specific purposes(background, hero image, content image, on mobile, on desktop, on 1080p, on 4k, etc).
The problem here is, the asset file used as the background doesn’t seem to be tailor-fitted as a background image for multiple viewports.
To answer the question, yes it’ll look weird/broken on other different devices.
To address this, we either, create multiple assets that is tailor-fit for their specific purposes(tedious, may also need to hire a designer), or we settle with what’s doable with only using CSS with consideration to its limitations and potential issues(4k and 8k display).
October 13, 2020 at 2:52 pm #1487554SapirHey,
I see. Thank you for the answer.I didn’t cleared my cache + I am not really sure how and what it does.
It’s kind of a fresh site.
Any advantege in doing that?October 13, 2020 at 3:06 pm #1487559ElvinStaffCustomer SupportI didnโt cleared my cache + I am not really sure how and what it does.
Itโs kind of a fresh site.
Any advantege in doing that?You don’t have to if you’re not using one. ๐
No problem. ๐
October 13, 2020 at 3:26 pm #1487568SapirVery wise indeed ๐
Thank you.
October 13, 2020 at 3:29 pm #1487569ElvinStaffCustomer SupportNo problem. ๐
October 14, 2020 at 12:18 pm #1489132SapirHey.
The CSS suddenly stopped working for some reason.
Yesterday I played with it using the CSS.
Today it isn’t working, but it does work using the customizer.Another question:
I had a button at homepage that was belong to the original theme style.
The command “Button” used for it.
When I created my button and used the same command, the button inherit the theme style (full Background, colors and that) and I coulde’nt change it.What are those “CSS Classes”? How can I use those Classes for building the site? Where can I find another commands?
October 14, 2020 at 3:28 pm #1489339ElvinStaffCustomer SupportHi,
This seems like a completely different issue. Can you open a new topic about it?
We’ll make sure it gets addressed there. Thank you.
-
AuthorPosts
- You must be logged in to reply to this topic.