Jump to content

How to center align product header for mobile

Go to solution Solved by tuanphan,

Recommended Posts

Site URL: https://www.thestorehousechicago.org/

Hi All, 

Perhaps someone has also experience this. In 7.1, when going into mobile view on the product page, the header is left aligned, despite the header being center aligned for desktop move. I tried google inspect the element to see what CSS I need to update; however, the following code doesn't work when injecting. Has anyone found a work around?

@media screen and (max-width: 575px)
site.css?&f…es=false:14
.products.collection-content-wrapper .nested-category-title {
  1. text-align: center;
}
 
Screenshot below is from the mobile sizing of the website. You can notice its left aligned.

image.png.c64e9a00af334cf42fa998b54a4ffd80.png

Link to comment
On 1/19/2021 at 1:28 AM, daveyjonezz said:

Thank you very much!

Do you want to add an arrow slide, instead of showing 1/4 thumbnail?

https://www.thestorehousechicago.org/merch/p/the-storehouse-chicago-enamel-pin

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment
On 1/21/2021 at 4:24 AM, daveyjonezz said:

That would great if you have the code!

Add to Design > Custom CSS

/* Product slide arrows control */
@media screen and (max-width:767px) {
.ProductItem-gallery-carousel-controls {
    display: flex !important;
}
/* arrows background */
.ProductItem-gallery-carousel-controls * {
    background: white;
}
.ProductItem-gallery-carousel-controls>div {
    justify-content: center !important;
}
.ProductItem .ProductItem-gallery-carousel-controls>div::after, .ProductItem .ProductItem-gallery-carousel-controls>div::before {
    border-color: black !important;
}
}

 

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment
  • 2 weeks later...
9 hours ago, plantshop203 said:

Hi, unfortunately the category title is still staying left-justified even with the below code inserted on my site: https://www.theoldyew.com/shop/rare-plants

Would love any help you can offer! Thank you

 


/* align shop title */
@media screen and (max-width:767px) {
h2.nested-category-title {
    text-align: center !important;
}
}

 

I see center here?

image.thumb.png.6151f36af6786617379a0ea7e80c7c36.png

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment
On 2/9/2021 at 11:41 PM, plantshop203 said:

 

Thank you for taking a look! It is still left-justified on mobile. See attached...

 

 

IMG_21DE4C4DF4AF-1.jpeg

Add to Design > Custom CSS

/* center shop title */
h2.nested-category-title.nested-category-title-padding {
    text-align: center !important;
    -webkit-box-pack: center;
        -ms-flex-pack: center;
            justify-content: center;
}

 

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment
  • 3 months later...
On 2/13/2021 at 4:45 AM, tuanphan said:

/* center shop title */ h2.nested-category-title.nested-category-title-padding { text-align: center !important; -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center; }

Hello,

 

I used this code, but it did not work for the mobile format. Will you please help me with this?

IMG_5036.jpg

Link to comment
On 6/10/2021 at 4:17 AM, Pdouble said:

Hello,

 

I used this code, but it did not work for the mobile format. Will you please help me with this?

IMG_5036.jpg

I don't see the shop title? 

https://www.porschewaldo.com/porschewaldo

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment
18 hours ago, Pdouble said:

It says Shop Wigs now. I've been able to align that part, now I'm having trouble aligning the BEST SELLER & NEW ARRIVALS section.

Actually, i don't see the BEST SELLER & NEW ARRIVALS text on https://www.porschewaldo.com/porschewaldo

Can you take a screenshot?

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment

The correct url should be https://www.porschewaldo.com/shopwigs

Add to Design > Custom CSS

/* center category links */
@media screen and (max-width:767px) {
.products.collection-content-wrapper .nested-category-children {
    justify-content: center;
}
}

 

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment
  • 1 year later...

 

Hi, I use these two codes and it works fine if there weren't so many categories. Unfortunately, I ran into the problem that it is cropped, besides, can you help me change the font of the previous category? (remove the caps and change it to walsheim custom font and move to center (like in computer version))

https://heptagon-brass-6xej.squarespace.com/

pw - hello

 

On 1/17/2021 at 10:05 AM, tuanphan said:

Add to Design > Custom CSS

/* align shop title */
@media screen and (max-width:767px) {
h2.nested-category-title {
    text-align: center !important;
}
}

 

On 6/18/2021 at 9:40 AM, tuanphan said:

The correct url should be https://www.porschewaldo.com/shopwigs

Add to Design > Custom CSS

/* center category links */
@media screen and (max-width:767px) {
.products.collection-content-wrapper .nested-category-children {
    justify-content: center;
}
}

 

3.png

2.png

1.png

Edited by Venera
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.