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

Topic summary

A user seeks to reposition elements in their mobile homepage banner—specifically moving the heading to the top center and the button to the bottom center.

Store Details:

  • Theme: Symmetry
  • Password-protected Wix store

Two CSS Solutions Provided:

Solution 1 (Made4uo-Ribe):

  • Navigate to Online Store > Themes > Assets > main.css
  • Add CSS using @media queries for screens under 599px
  • Uses CSS Grid (display: grid) to control layout with grid-template-rows
  • Sets specific heights (40vh, 55vh) and auto margins

Solution 2 (EBOOST):

  • Similar approach via Assets/main.css
  • Targets screens under 749px
  • Uses Flexbox (display: flex; flex-flow: column) for vertical alignment
  • Includes section-specific ID selectors for precise targeting
  • Centers text alignment and adjusts margins

Both solutions involve adding custom CSS to the theme’s stylesheet with mobile-specific media queries. The discussion remains open—no confirmation yet on which approach the user implemented or whether either resolved the issue.

Summarized with AI on November 7. AI used: claude-sonnet-4-5-20250929.

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

1 Like

Hi @elotomo

Check this one.

  1. From you Admin page, go to Online Store > Themes
  2. Select the theme you want to edit
  3. Under the Asset folder, open the main.css(base.css, style.css or theme.css)
  4. 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;
    }
}

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

Hi @elotomo ,

May I suggest to update code these steps:

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

  1. Assets/main.css
  2. 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;
	}
}