Home button resizing and relocating

Callum77
Tourist
10 0 1

IMG_2070.jpeg

 as you can see from the above image, the “product categories” button isn’t the right size or place. The banner image for desktop and mobile are slightly different.

 

what I need is some code that will:

a) Desktop - make the button larger, and in the centre of the text box between the writing

b) Mobile - make the button smaller and in the centre of the text box and the writing.

 

if anyone could help me with this it will be amazing. I’ll leave the stores preview page in the comments.

Replies 2 (2)

Callum77
Tourist
10 0 1

Made4uo-Ribe
Shopify Partner
5562 1336 1650

Hi @Callum77 

It seems like the header and text content in the banner is attached with the image. The shopify banner have a default header and subheading which you can change the text anytime. It is responsive in any screen and the buttons also will be responsive base on the text where you align theme. Example like this. 

Made4uoRibe_0-1707942454707.png

Made4uoRibe_1-1707942560521.png

That is the reason in your side, the buttons wont be align even we align them on the one size screen it will be moving a lot on other screen size. 

You can check this one. 

From your Shopify admin dashboard, click on "Online Store" and then "Themes".

Find the theme that you want to edit and click on "Actions" and then "Edit code".

In the "Assets" folder, click on "base.css, style.css or theme.css" file, depending on which file your theme uses to store its CSS styles. At the bottom of the file, add the following CSS code:

 

@media only screen and (min-width: 749px){
a.button.button--primary {
    padding: 2rem 5rem;
}
.banner__box.content-container.content-container--full-width-mobile.color-scheme-3.gradient {
    align-self: center;
    margin-top: 10%;
}
}
@media only screen and (max-width: 749px){
.banner__box.content-container.content-container--full-width-mobile.color-scheme-3.gradient {
    padding-bottom: 1.5rem;
}

a.button.button--primary {
    min-height: 3.5rem;
}
}

 

And Save. 

Result:

Made4uoRibe_2-1707942715313.pngMade4uoRibe_3-1707942749987.png

 

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

 

Please don't forget to 

Like

 and 

Mark Solution 

to the post that helped you. Thanks!
Sip, savor, and support – your

Coffee Tip

 helps us keep coding magic.❤️❤️❤️
Need a knowledgeable developer? Come and visit us at

Made4uo.com