- This topic has 11 replies, 3 voices, and was last updated 3 years, 9 months ago by Tom.
-
AuthorPosts
-
July 19, 2020 at 10:11 am #1368852Kevin
Hi, i`m working on a mobile header. Actually the Page has a 50% Text and 50% nothing Container with Background Image. Now i would love to get a special mobile Background image which is on the first position and after that the text part from the 50% container, so the Text is not on the face from the girl.
Any ideas how i get this?
This css is actually active, so i get the mobile background
@media (max-width: 768px) { .gb-container.no-mobile-background { background-image: url(https://iris.techgarage.media/wp-content/uploads/2020/07/gabby-about-mobile.jpg); } }
Now i fight with the positions.
Thx
KevinJuly 19, 2020 at 4:34 pm #1369078TomLead DeveloperLead DeveloperHi there,
You can move the background image around using
background-position
:@media (max-width: 768px) { .gb-container.no-mobile-background { background-image: url(https://iris.techgarage.media/wp-content/uploads/2020/07/gabby-about-mobile.jpg); background-position: 50% auto; } }
Let me know if that helps or not π
July 20, 2020 at 12:24 am #1369277KevinThank you Tom.
Actually it looks same like before. Is there any Order i have to fix with the Container?
This is inside the Editor https://www.evernote.com/l/AgwgHJDKD9hFs7tfabMcQEoufugF8ceox8Q
And this is how it looks mobile https://www.evernote.com/l/Agzsj7j1Rr5F9KZWmyCZSWXj08m-jDfnpW4July 20, 2020 at 3:29 am #1369418DavidStaffCustomer SupportHi there,
if you were to give the empty column some height on mobile ( by adding Padding ) it should create a safe zone over the image, and push the text below it.
July 20, 2020 at 7:18 am #1369605Kevinhmm doesnβt work for me. Actually i just want to have a mobile page like this π https://gabbybernstein.com/meet-gabby/
July 20, 2020 at 2:52 pm #1370132TomLead DeveloperLead DeveloperSo are you just wanting to push the text down further on mobile then?
July 20, 2020 at 3:04 pm #1370155KevinYes i want mobile a “special mobile image” and then the text from Container 2 under the image on a clean background color. So that the text is readable.
On desktop the text is right on a blured place next to the girls face.
July 20, 2020 at 3:36 pm #1370177TomLead DeveloperLead DeveloperHmm, what if you gave the container with the text a semi-transparent background on mobile using CSS? That way the background image can stay the same, but the text will be readable.
July 20, 2020 at 11:35 pm #1370384KevinYeah the idea is great, and i use it on other pages with this way, but for the branding of the person i need she without any text on there face π
July 21, 2020 at 9:43 am #1371100TomLead DeveloperLead DeveloperMakes sense. So what exactly is the solution you’re wanting to implement? Not sure I’m fully understanding from the previous posts. An example would definitely help π
July 21, 2020 at 9:45 am #1371102KevinSorry π
I would have a container and css solution to have a header like this – https://gabbybernstein.com/meet-gabby/
On Desktop a Image Background with Text (works already with 50% / 50% Container)
And on Mobile just a special Mobile Header Image and under the image the same Text like on Desktop but with a White Background, so it is good readable.Hope it makes sense π
July 21, 2020 at 3:10 pm #1371422TomLead DeveloperLead DeveloperGot it!
I think you would have to:
1. Give your hero text container a class like this:
hide-on-mobile
2. Create a second Container under the hero container with the text, and give it this class:
hide-on-desktop hide-on-tablet
That way it should disappear on mobile and appear below.
-
AuthorPosts
- You must be logged in to reply to this topic.