Hi, how can I change the width of this section:
-
1. I want to align it to the center of the page.
-
I want to make it slightly narrower, at 1300px.
Here is my store URL: https://1049xn-ya.myshopify.com/
Thanks a lot,
Tim
A user needed to center and resize a specific section on their Shopify store to 1300px width. The section in question was an image-with-text component that needed to be narrower than the default width.
Solutions Provided:
Three different CSS-based approaches were offered:
</head> tagAll solutions used @media screen and (min-width: 1024px) to apply the 1300px width only on desktop screens. The approaches targeted either the specific section ID or the general image-with-text class.
Resolution: The original poster confirmed one of the solutions worked successfully.
Hi, how can I change the width of this section:
1. I want to align it to the center of the page.
I want to make it slightly narrower, at 1300px.
Here is my store URL: https://1049xn-ya.myshopify.com/
Thanks a lot,
Tim
You can try this code by following these steps:
Step 1: Go to the online store ->Theme ->Edit Code.
Step 2: Find the theme.liquid file and add the following code before the tag
Hopefully it will help you. If yes then Please don’t forget hit Like and Mark it as solution!
Hi @CreatorTim ,
You can follow the steps here:
Step 1: Shopify admin > Online store > Customize: https://prnt.sc/XQ6IDB99kUCd
Step 2: From the left menu > Theme settings > Open Custom CSS: https://prnt.sc/ypQ7nly2wv27
Step 3: Copy the code below and paste it there
Here is the code for step 3:
@media screen and (min-width: 1024px){
.section-template--22711083729161__image_with_text_ejW6Nw-padding .page-width > .image-with-text {
width: 1300px !important;
}
}
Here is the result:
Let me know if it works!
Best,
Daisy
Hi CreatorTim
You can try to follow this step
Step 1: Go to Edit code
Step 2: Find file base.css and add this code at the end of the file
@media screen and (min-width: 1024px){
.image-with-text.image-with-text--no-overlap.isolate {
width: 1300px;
}
}
Best,
Esther
Thank you man! Appreciate it