Create a new section-side by side pictures with text

Hello

I am trying to create a side by side Image section with an overlay text and call to action button similar to the below.

I am using Dawn

Hi, you want to create new section or want to use exting section image with text

The it is easy to give a solution.

Thank you

Whichever solution is easier

Hi @Samer1 ,
You can use image banners to do this

Hope this can help you
Kind regards,

HDL-Shin

hi @Samer1 ,

I have made a section for you here is the code. and output


  {% for block in section.blocks %}
    

      
      

        ## {{ block.settings.heading }}
        

{{ block.settings.text }}

        {{ block.settings.button_label }}
      

    

  {% endfor %}

{% schema %}
{
  "name": "Hover Image",
  "class": "section",
  "disabled_on": {
    "groups": ["header", "footer"]
  },
  "settings": [

  ],
  "blocks": [
    {
      "type": "heading",
      "name": "t:sections.image-with-text.blocks.heading.name",
      "limit": 2,
      "settings": [
        {
      "type": "image_picker",
      "id": "image",
      "label": "t:sections.image-with-text.settings.image.label"
    },
        {
      "type": "select",
      "id": "height",
      "options": [
        {
          "value": "adapt",
          "label": "t:sections.image-with-text.settings.height.options__1.label"
        },
        {
          "value": "small",
          "label": "t:sections.image-with-text.settings.height.options__2.label"
        },
        {
          "value": "medium",
          "label": "t:sections.image-with-text.settings.height.options__3.label"
        },
        {
          "value": "large",
          "label": "t:sections.image-with-text.settings.height.options__4.label"
        }
      ],
      "default": "adapt",
      "label": "t:sections.image-with-text.settings.height.label"
    } ,
        {
          "type": "inline_richtext",
          "id": "heading",
          "default": "Image with text",
          "label": "t:sections.image-with-text.blocks.heading.settings.heading.label"
        },
         {
          "type": "text",
          "id": "button_label",
          "default": "Button Label",
          "label": "Button Label"
        },
         {
          "type": "url",
          "id": "button_link",
          "label": "Button Link"
        }

      ]
    }

  ],
  "presets": [
    {
      "name": "t:sections.image-with-text.presets.name",
      "blocks": [
        {
          "type": "heading"
        }
      ]
    }
  ]
}
{% endschema %}

Hope this will help you.

Regards
Shopidevs

1 Like

@HDL-Shin & @Arif_Shopidevs both solutions worked perfectly!!!

You guys are the best!

@HDL-Shin is there a way to hide only the second photo on mobile?

Hi @Samer1 , pls try code in your theme and check it in storefront

@media (max-width: 749px) {
  .banner__media.media.banner__media-half:nth-child(2) {
    display: none !important;
  }
}

Hope this can help you,

If our suggestions are useful, please let us know by giving it a like or marking it as a solution. Thank you :heart_eyes: :heart_eyes: