- This topic has 11 replies, 3 voices, and was last updated 3 years, 4 months ago by
David.
-
AuthorPosts
-
December 12, 2022 at 5:42 am #2458879
René
Hope that’s understandable. The image should be in a container (1440px) and aligned to the right. The rest of the content should be in a container with a width of 1280px. Already tried to build something with position relative and absolute but didn’t work.
Unfortunately, I am not allowed to publish this page here.
December 12, 2022 at 8:49 am #2459257David
StaffCustomer SupportHi there,
can you share a link to where i can see this ?
December 12, 2022 at 9:05 am #2459290René
like I said, I’m not allowed to make the page public. The site is also protected with a front-end login. I can send it to an email address.
December 12, 2022 at 9:47 am #2459359David
StaffCustomer SupportBelow the reply box is the Private Information field:
https://docs.generatepress.com/article/using-the-premium-support-forum/#private-information
Only GeneratePress Admins can see its contents, so you can share any links and logins there.
December 12, 2022 at 10:17 am #2459413René
Here are the Details:
December 12, 2022 at 5:33 pm #2459730Fernando Customer Support
Hi René,
Should the Image be a Background Image for your Page Hero? If so, can you try adding it as a Background Image for the Container Block for the Page Hero? Reference: https://docs.generateblocks.com/article/container-overview/#backgrounds
Otherwise, if it’s an Image under the Page Hero, can you try adding it through a GB Image Block instead? And, set the width to
100%. Reference: https://docs.generateblocks.com/article/image-overview/December 13, 2022 at 2:27 am #2460118René
The first option is not responsive, because the image should slide under the text on tablet and mobile. A background image would be difficult to display responsively.
The other option is also not a solution. The GB image block would still be within 1280px.
One possibility might be (as I have already tried) to work with position absolute and relative.
Would that be somehow possible?
<div 1280>Defined at Customizer->Layout | cant change this> <div 1440 RELATIVE> <div 1280 FLEX> <div>text</div> <div ABSOLUTE(@media query) ALIGN-RIGHT>image</div> </div 1280> </div 1440> </div>December 13, 2022 at 3:20 am #2460187David
StaffCustomer SupportTry this CSS:
@media(min-width: 1280px) { .home-hero { position: relative; } .home-hero .gb-inside-container { position: static !important; } .home-hero-image { position: absolute; right: 0; top: 50%; transform: translateY(-50%); } }And then give the Image Block an Advanced > additional CSS Class of:
home-hero-image
Adjust the @media query to suit.
You will need to give the left hand grid column a higer z-index value to put it in front.December 13, 2022 at 6:03 am #2460367René
In this way, the image is displayed completely at the edge of the screen. But it must be inside a container with a width of 1440px.
December 13, 2022 at 6:31 am #2460397David
StaffCustomer SupportChange the
right: 0;to:right: calc( ( 100vw - 1440px ) / 2 );December 17, 2022 at 2:49 am #2464910René
I solved the Problem width relative und absolute position. I missed your note with the
right:0;, thank you.@media (min-width: 1025px) { .home-hero-image img{ max-height: 564px; width: auto; } .ueber-uns .home-hero-image img{ max-height: 500px; } .page-hero-image{ flex-wrap: initial !important; } .relative>.gb-inside-container{ position: relative; } .home-hero>div>div>div>div>div:first-child, .smooth-scroll{ z-index: 99; } .home-hero>div>div:first-child>div>div>div:nth-child(2){ right:0; position: absolute; margin-top: 48px; max-width: 65%; } }December 17, 2022 at 7:36 am #2465082David
StaffCustomer SupportGlad to hear you found a solution
-
AuthorPosts
- You must be logged in to reply to this topic.