What's your biggest current challenge? Have your say in Community Polls along the right column.

Adapting the banner on the home page to the phone version - image with text overlay

Solved

Adapting the banner on the home page to the phone version - image with text overlay

elotomo
Excursionist
29 0 12

Hello, 

 

I would like to adapt the banner on the home page to the mobile version. 

 

More specifically, I would like the heading to be at the top in the middle and the button at the bottom in the middle (something like the example photo below).

 

My store:  https://www.drollsport.com/

Password: Wixa

Theme: Symmetry 

IMG_0651.jpg

Zrzut ekranu 2024-07-29 o 22.17.20.png

Accepted Solutions (2)

Made4uo-Ribe
Shopify Partner
9159 2184 2700

This is an accepted solution.

Hi @elotomo 

Check this one. 

  1. From you Admin page, go to Online Store > Themes
  1. Select the theme you want to edit
  2. Under the Asset folder, open the main.css(base.css, style.css or theme.css)
  3. Then place the code below at the very bottom of the file.

 

@media only screen and (max-width: 599px) {
    .text-overlay__text {
        display: grid;
        grid-template-rows: auto 1fr;
        height: 55vh;
    }
    .text-overlay__inner {
      margin: auto;
}
}
@media only screen and (max-width: 449px) {
    .text-overlay__text {
    height: 40vh;
     }
    .text-overlay__inner {
    margin: auto;
    }
}

 

  • And Save. 
  • Result:
  • Made4uoRibe_0-1722372297333.png

     

Please don't forget to Like and Mark Solution to the post that helped you. Thanks!

If this fixed your issue, Likes and Accept as Solution are highly appreciated. Coffee tips fuel my dedication.
Get experienced Shopify developers at affordable rates—visit Made4Uo.com for a quick quote!
Need THEME UPDATES but have custom codes? No worries, for an affordable price.
Create custom Shopify pages effortlessly with PageFly's drag-and-drop ⚙️.

View solution in original post

EBOOST
Shopify Partner
1252 324 373

This is an accepted solution.

Hi @elotomo ,

 

May I suggest to update code these steps:

1. Go to Store Online-> theme -> edit code

EBOOST_1-1672356985580.png
2. Assets/main.css
3. Add code below to end of file

@media(max-width: 749px){
	#shopify-section-template--21235606257999__image_with_text_overlay_HXew7Y .text-overlay--for-banner .text-overlay__inner {
		height: 100%;
	}
	
	#shopify-section-template--21235606257999__image_with_text_overlay_HXew7Y .text-overlay--for-banner .text-overlay__text {
		height: inherit;
		  display: flex;
		  flex-flow: column;
		  align-items: center;
		  text-align: center;
	}
	#shopify-section-template--21235606257999__image_with_text_overlay_HXew7Y .text-overlay--for-banner .text-overlay__text .subheading,
	#shopify-section-template--21235606257999__image_with_text_overlay_HXew7Y .text-overlay--for-banner .text-overlay__text .text-overlay__title{ 
		margin-left: auto;
		margin-right: auto;
	}	
	#shopify-section-template--21235606257999__image_with_text_overlay_HXew7Y .text-overlay--for-banner .text-overlay__text .text-overlay__button-row {
		margin-top: auto;
	}
}

EBOOST_0-1722372746665.png

 

 

- Hope can help. If you find my reply helpful, please hit Like and Mark as Solution
- Need a Shopify developer? Contact email: eboost10@gmail.com
- Visit our site: https://www.eboosttech.net to view and download shopify themes and magento2 extensions free
- ❤❤DONATE ❤❤Coffee tips

View solution in original post

Replies 2 (2)

Made4uo-Ribe
Shopify Partner
9159 2184 2700

This is an accepted solution.

Hi @elotomo 

Check this one. 

  1. From you Admin page, go to Online Store > Themes
  1. Select the theme you want to edit
  2. Under the Asset folder, open the main.css(base.css, style.css or theme.css)
  3. Then place the code below at the very bottom of the file.

 

@media only screen and (max-width: 599px) {
    .text-overlay__text {
        display: grid;
        grid-template-rows: auto 1fr;
        height: 55vh;
    }
    .text-overlay__inner {
      margin: auto;
}
}
@media only screen and (max-width: 449px) {
    .text-overlay__text {
    height: 40vh;
     }
    .text-overlay__inner {
    margin: auto;
    }
}

 

  • And Save. 
  • Result:
  • Made4uoRibe_0-1722372297333.png

     

Please don't forget to Like and Mark Solution to the post that helped you. Thanks!

If this fixed your issue, Likes and Accept as Solution are highly appreciated. Coffee tips fuel my dedication.
Get experienced Shopify developers at affordable rates—visit Made4Uo.com for a quick quote!
Need THEME UPDATES but have custom codes? No worries, for an affordable price.
Create custom Shopify pages effortlessly with PageFly's drag-and-drop ⚙️.

EBOOST
Shopify Partner
1252 324 373

This is an accepted solution.

Hi @elotomo ,

 

May I suggest to update code these steps:

1. Go to Store Online-> theme -> edit code

EBOOST_1-1672356985580.png
2. Assets/main.css
3. Add code below to end of file

@media(max-width: 749px){
	#shopify-section-template--21235606257999__image_with_text_overlay_HXew7Y .text-overlay--for-banner .text-overlay__inner {
		height: 100%;
	}
	
	#shopify-section-template--21235606257999__image_with_text_overlay_HXew7Y .text-overlay--for-banner .text-overlay__text {
		height: inherit;
		  display: flex;
		  flex-flow: column;
		  align-items: center;
		  text-align: center;
	}
	#shopify-section-template--21235606257999__image_with_text_overlay_HXew7Y .text-overlay--for-banner .text-overlay__text .subheading,
	#shopify-section-template--21235606257999__image_with_text_overlay_HXew7Y .text-overlay--for-banner .text-overlay__text .text-overlay__title{ 
		margin-left: auto;
		margin-right: auto;
	}	
	#shopify-section-template--21235606257999__image_with_text_overlay_HXew7Y .text-overlay--for-banner .text-overlay__text .text-overlay__button-row {
		margin-top: auto;
	}
}

EBOOST_0-1722372746665.png

 

 

- Hope can help. If you find my reply helpful, please hit Like and Mark as Solution
- Need a Shopify developer? Contact email: eboost10@gmail.com
- Visit our site: https://www.eboosttech.net to view and download shopify themes and magento2 extensions free
- ❤❤DONATE ❤❤Coffee tips