Are you a GenerateCustomer?

Do you have an active GP Premium or GenerateBlocks Pro license key?

Create a GenerateSupport account for GeneratePress and GenerateBlocks support in one dedicated place.

Create an account
Already have a GenerateSupport account? Login

Just browsing?

Feel free to browse the forums. Support for our free versions is provided on WordPress.org (GeneratePress, GenerateBlocks).

Want to become a premium user? Learn more below.

Split container

  • Hello,

    I want to create my homepage like this: https://www.floriangadsby.com. The first hero/container needs to be split in half, only on desktop. The left container will contain text, buttons, and social media links. The right container will contain a grid of portfolio images (no background image). Screenshot 1 shows the current state of my website, and screenshot 2 displays what I’m trying to achieve. Could you assist me with this? I’ve added a link to my current website.

  • Hi there,

    1. create a new draft page, and set the Content Container to Full Width.

    2. in the top bar 3 dot menu switch to Code editor

    3. Copy and Paste this block HTML into the editor

    
    <!-- wp:generateblocks/container {"uniqueId":"034a7cc2","isDynamic":true,"blockVersion":4,"display":"flex","displayMobile":"block","alignItems":"center","sizing":{"minHeight":""}} -->
    <!-- wp:generateblocks/container {"uniqueId":"e0fa5fba","isDynamic":true,"blockVersion":4,"display":"flex","justifyContent":"flex-end","sizing":{"width":"50%","height":"100%","widthMobile":"100%"},"spacing":{"paddingTopMobile":"","paddingLeft":"40px","paddingRight":"40px","paddingLeftTablet":"30px","paddingRightTablet":"30px","marginLeftMobile":"","paddingLeftMobile":"20px","paddingRightMobile":"20px"}} -->
    <!-- wp:generateblocks/container {"uniqueId":"ce580460","isDynamic":true,"blockVersion":4,"display":"flex","flexDirection":"column","alignItems":"flex-start","sizing":{"maxWidth":"725px","width":"100%","minHeight":"400px"},"spacing":{"paddingTop":"40px","paddingBottom":"40px"}} -->
    <!-- wp:generateblocks/headline {"uniqueId":"cb57d79e","element":"h1","blockVersion":3} -->
    <h1 class="gb-headline gb-headline-cb57d79e gb-headline-text">My Title</h1>
    <!-- /wp:generateblocks/headline -->
    
    <!-- wp:generateblocks/button {"uniqueId":"67b5922f","blockVersion":4,"display":"inline-flex","spacing":{"paddingTop":"15px","paddingRight":"20px","paddingBottom":"15px","paddingLeft":"20px"},"backgroundColor":"#0366d6","backgroundColorHover":"#222222","textColor":"#ffffff","textColorHover":"#ffffff"} -->
    <span class="gb-button gb-button-67b5922f gb-button-text">Button</span>
    <!-- /wp:generateblocks/button -->
    
    <!-- wp:generateblocks/container {"uniqueId":"c6406b7e","isDynamic":true,"blockVersion":4,"display":"flex","columnGap":"20px","spacing":{"marginTop":"auto"}} -->
    <!-- wp:generateblocks/button {"uniqueId":"ed5abdc1","blockVersion":4,"display":"inline-flex","alignItems":"center","columnGap":"0.5em","spacing":{"paddingTop":"0px","paddingRight":"0px","paddingBottom":"0px","paddingLeft":"0px"},"textColor":"var(\u002d\u002dcontrast)","textColorHover":"var(\u002d\u002daccent)","hasIcon":true,"removeText":true,"iconStyles":{"height":"2em","width":"2em"}} -->
    <span class="gb-button gb-button-ed5abdc1"><span class="gb-icon"><svg aria-hidden="true" role="img" height="1em" width="1em" viewBox="0 0 448 512" xmlns="http://www.w3.org/2000/svg"><path fill="currentColor" d="M224.1 141c-63.6 0-114.9 51.3-114.9 114.9s51.3 114.9 114.9 114.9S339 319.5 339 255.9 287.7 141 224.1 141zm0 189.6c-41.1 0-74.7-33.5-74.7-74.7s33.5-74.7 74.7-74.7 74.7 33.5 74.7 74.7-33.6 74.7-74.7 74.7zm146.4-194.3c0 14.9-12 26.8-26.8 26.8-14.9 0-26.8-12-26.8-26.8s12-26.8 26.8-26.8 26.8 12 26.8 26.8zm76.1 27.2c-1.7-35.9-9.9-67.7-36.2-93.9-26.2-26.2-58-34.4-93.9-36.2-37-2.1-147.9-2.1-184.9 0-35.8 1.7-67.6 9.9-93.9 36.1s-34.4 58-36.2 93.9c-2.1 37-2.1 147.9 0 184.9 1.7 35.9 9.9 67.7 36.2 93.9s58 34.4 93.9 36.2c37 2.1 147.9 2.1 184.9 0 35.9-1.7 67.7-9.9 93.9-36.2 26.2-26.2 34.4-58 36.2-93.9 2.1-37 2.1-147.8 0-184.8zM398.8 388c-7.8 19.6-22.9 34.7-42.6 42.6-29.5 11.7-99.5 9-132.1 9s-102.7 2.6-132.1-9c-19.6-7.8-34.7-22.9-42.6-42.6-11.7-29.5-9-99.5-9-132.1s-2.6-102.7 9-132.1c7.8-19.6 22.9-34.7 42.6-42.6 29.5-11.7 99.5-9 132.1-9s102.7-2.6 132.1 9c19.6 7.8 34.7 22.9 42.6 42.6 11.7 29.5 9 99.5 9 132.1s2.7 102.7-9 132.1z"></path></svg></span></span>
    <!-- /wp:generateblocks/button -->
    
    <!-- wp:generateblocks/button {"uniqueId":"b809ecef","blockVersion":4,"display":"inline-flex","alignItems":"center","columnGap":"0.5em","spacing":{"paddingTop":"0px","paddingRight":"0px","paddingBottom":"0px","paddingLeft":"0px"},"textColor":"var(\u002d\u002dcontrast)","textColorHover":"var(\u002d\u002daccent)","hasIcon":true,"removeText":true,"iconStyles":{"height":"2em","width":"2em"}} -->
    <span class="gb-button gb-button-b809ecef"><span class="gb-icon"><svg aria-hidden="true" role="img" height="1em" width="1em" viewBox="0 0 448 512" xmlns="http://www.w3.org/2000/svg"><path fill="currentColor" d="M380.9 97.1C339 55.1 283.2 32 223.9 32c-122.4 0-222 99.6-222 222 0 39.1 10.2 77.3 29.6 111L0 480l117.7-30.9c32.4 17.7 68.9 27 106.1 27h.1c122.3 0 224.1-99.6 224.1-222 0-59.3-25.2-115-67.1-157zm-157 341.6c-33.2 0-65.7-8.9-94-25.7l-6.7-4-69.8 18.3L72 359.2l-4.4-7c-18.5-29.4-28.2-63.3-28.2-98.2 0-101.7 82.8-184.5 184.6-184.5 49.3 0 95.6 19.2 130.4 54.1 34.8 34.9 56.2 81.2 56.1 130.5 0 101.8-84.9 184.6-186.6 184.6zm101.2-138.2c-5.5-2.8-32.8-16.2-37.9-18-5.1-1.9-8.8-2.8-12.5 2.8-3.7 5.6-14.3 18-17.6 21.8-3.2 3.7-6.5 4.2-12 1.4-32.6-16.3-54-29.1-75.5-66-5.7-9.8 5.7-9.1 16.3-30.3 1.8-3.7.9-6.9-.5-9.7-1.4-2.8-12.5-30.1-17.1-41.2-4.5-10.8-9.1-9.3-12.5-9.5-3.2-.2-6.9-.2-10.6-.2-3.7 0-9.7 1.4-14.8 6.9-5.1 5.6-19.4 19-19.4 46.3 0 27.3 19.9 53.7 22.6 57.4 2.8 3.7 39.1 59.7 94.8 83.8 35.2 15.2 49 16.5 66.6 13.9 10.7-1.6 32.8-13.4 37.4-26.4 4.6-13 4.6-24.1 3.2-26.4-1.3-2.5-5-3.9-10.5-6.6z"></path></svg></span></span>
    <!-- /wp:generateblocks/button -->
    
    <!-- wp:generateblocks/button {"uniqueId":"7697b275","blockVersion":4,"display":"inline-flex","alignItems":"center","columnGap":"0.5em","spacing":{"paddingTop":"0px","paddingRight":"0px","paddingBottom":"0px","paddingLeft":"0px"},"textColor":"var(\u002d\u002dcontrast)","textColorHover":"var(\u002d\u002daccent)","hasIcon":true,"removeText":true,"iconStyles":{"height":"2em","width":"2em"}} -->
    <span class="gb-button gb-button-7697b275"><span class="gb-icon"><svg aria-hidden="true" role="img" height="1em" width="1em" viewBox="0 0 448 512" xmlns="http://www.w3.org/2000/svg"><path fill="currentColor" d="M100.28 448H7.4V148.9h92.88zM53.79 108.1C24.09 108.1 0 83.5 0 53.8a53.79 53.79 0 0 1 107.58 0c0 29.7-24.1 54.3-53.79 54.3zM447.9 448h-92.68V302.4c0-34.7-.7-79.2-48.29-79.2-48.29 0-55.69 37.7-55.69 76.7V448h-92.78V148.9h89.08v40.8h1.3c12.4-23.5 42.69-48.3 87.88-48.3 94 0 111.28 61.9 111.28 142.3V448z"></path></svg></span></span>
    <!-- /wp:generateblocks/button -->
    <!-- /wp:generateblocks/container -->
    <!-- /wp:generateblocks/container -->
    <!-- /wp:generateblocks/container -->
    
    <!-- wp:generateblocks/container {"uniqueId":"854f3ebb","bgImage":{"id":"","image":{"url":"https://staging.year93.net/wp-content/uploads/IMG_1454.jpg"}},"isDynamic":true,"blockVersion":4,"sizing":{"width":"50%","height":"","minHeight":"100vh","widthMobile":"100%"}} /-->
    <!-- /wp:generateblocks/container -->
    

    4. Switch back to the visual editor.

    That will give you the basic layout you need. Have a look at its list view to see how its constructed.
    For reference:

    Container Block #1
    —- Container Block #2
    —- —- Container Block #2.1
    —- —- —- Headline
    —- —- —- Button
    —- —- —- Container Block #2.1.1
    —- —- —- —- Icon buttons
    —- Container Block #3

    Container Block #1 & #2
    Have a Layout of Display > Flex

    Container Block #2 and #3
    Have a Width of 50% – this creates the 2 column full screen layout.

    Container Block #2
    Has a Layout > Display Flex, and its Justify Content to Flex End ( Right )
    This will align Container Block #2.1 to the right

    Container Block #2.1
    Has Sizing > Max Width of 725px which is 50% of your main container width of 1450px.
    This keeps the container aligned with your header etc.
    And it has a Sizing > Min Height of 400px, adjust that to suit.
    It also has a Layout > Display of Flex, Flex Column. Which will allow the social icons to be pushed down.

    Container Block #2.1.1
    Is the social icon button container.
    It has a Spacing Margin Top of auto which pushes it down to the bottom of the container.

    Container Block #3
    has the background image set

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.