adjusting image banner width

Solved

adjusting image banner width

jahin2
Excursionist
30 1 5

Help me adjust the image banner width to match the sections below it. on desktop version now the image banner @ top is showing full width while the sections below it have less width. here's the store URL

https://orxydj1le98spcri-90656506170.shopifypreview.com

jahin2_1-1734099293518.png

 

Accepted Solution (1)
jahin2
Excursionist
30 1 5

This is an accepted solution.

now both versions are working fine. Thanks for the help.❤️

 

jahin2_1-1734377649386.png



jahin2_2-1734377667422.png

 

View solution in original post

Replies 10 (10)

asharofficial
Excursionist
41 5 16

You can used this

Steps to Add Custom CSS in Shopify

  1. From your Shopify admin, go to Online Store > Themes.
  2. Click Actions for the theme you want to edit, then select Edit code.
  3. Find the base.css file under Assets (or whichever CSS file your theme uses).
  4. Scroll to the bottom of the file and add the following CSS code:

 

 

 

.banner--adapt {
    width: 1400px;
    margin: auto;
}

 

 

 

asharofficial_0-1734099869590.png

 

 Looking for skilled Shopify developers? Hire Me WhatsApp: +92 334 387 4850


Support me: Buy me a coffee


 If this solved your problem, I’d truly appreciate it if you could show some love by liking this or marking it as the solution! 


jahin2
Excursionist
30 1 5

Hi Ashar,

 

Thanks for the reply. 

added the code @ end of the base.css

still not updated. while viewing on full screen still the banner width is over sized.

asharofficial
Excursionist
41 5 16

Let me know the screen size please.

Also just make sure do hard refresh please

 Looking for skilled Shopify developers? Hire Me WhatsApp: +92 334 387 4850


Support me: Buy me a coffee


 If this solved your problem, I’d truly appreciate it if you could show some love by liking this or marking it as the solution! 


jahin2
Excursionist
30 1 5

So i adjusted the width to 1200px and it worked. thank you so much for the help.

but after applying it the previous code we did for the mobile version no longer working. its now showing the banner at full 1200px width. can you please help with that?

store link: https://s11iaukvyuisywf1-90656506170.shopifypreview.com


scroll option showing on bottom to view the full banner. see below.

jahin2_0-1734361984042.png

 



asharofficial
Excursionist
41 5 16

@media (min-width: 768px) {
.banner--adapt {
width: 1200px;
margin: auto;
}
}

 Looking for skilled Shopify developers? Hire Me WhatsApp: +92 334 387 4850


Support me: Buy me a coffee


 If this solved your problem, I’d truly appreciate it if you could show some love by liking this or marking it as the solution! 


jahin2
Excursionist
30 1 5

Now the banner image is not showing in mobile version.

jahin2_0-1734376270643.png

 

jahin2
Excursionist
30 1 5

So now the issue cleared. I've tried to edit the code and it seems working. below is the code,

/* Apply only on mobile screens */
@media (max-width: 768px) {
.banner__media img {
zoom: 2;
object-fit: cover;
object-position: right;
height: 183px !important;
width: 100% !important;
position: relative !important;
}

.banner__media:before {
padding-bottom: 0 !important;
}
}

@media (min-width: 768px)
{
.banner--adapt {
min-width: 300px;
max-width: 1300px;
margin: auto;
}

jahin2
Excursionist
30 1 5

This is an accepted solution.

now both versions are working fine. Thanks for the help.❤️

 

jahin2_1-1734377649386.png



jahin2_2-1734377667422.png

 

asharofficial
Excursionist
41 5 16

Thanks

 Looking for skilled Shopify developers? Hire Me WhatsApp: +92 334 387 4850


Support me: Buy me a coffee


 If this solved your problem, I’d truly appreciate it if you could show some love by liking this or marking it as the solution! 


jahin2
Excursionist
30 1 5

can you help with another question?

Re: how to change the button color for whole website.
https://community.shopify.com/c/shopify-design/how-to-change-the-button-color-for-whole-website/m-p/...