Resize "product title" text on product pages in desktop view.

Resize "product title" text on product pages in desktop view.

Geltier
Excursionist
30 0 8

Hi!

 

In mobile view, the text is in correct place. But in desktop view, the text is not in line. Photo attached to show what I mean. I wish the text had same padding as "add to cart" and the text below add to cart.. in desktop view.

Thank you!
Skärmavbild 2025-04-06 kl. 21.17.21.png

Replies 9 (9)

Asad-Mahmood
Shopify Partner
390 67 76

whats your store url ?

If my solution has been helpful, you can consider supporting me via Buy Me a Coffee.
Hire me: asadmahmood8470@gmail.com
WhatsApp
Fiver




Geltier
Excursionist
30 0 8
Asad-Mahmood
Shopify Partner
390 67 76

what do you want to update in mobile view ?

AsadMahmood_0-1743968871471.png

 

If my solution has been helpful, you can consider supporting me via Buy Me a Coffee.
Hire me: asadmahmood8470@gmail.com
WhatsApp
Fiver




Geltier
Excursionist
30 0 8

In mobile view its all good, its only in desktop view we need help with

Asad-Mahmood
Shopify Partner
390 67 76

go to your online store -> edit code -> theme.css file and paste this code in the end of file

@media (min-width: 1024px) {
  [data-block-type="title"],
  [data-group-type="text-with-rating"] {
    padding-left: 12px;
    padding-right: 12px;
  }
}

 

AsadMahmood_0-1743969394549.png

 

If my solution has been helpful, you can consider supporting me via Buy Me a Coffee.
Hire me: asadmahmood8470@gmail.com
WhatsApp
Fiver




Geltier
Excursionist
30 0 8

Is this only for desktop view as requested? It did not work.

Asad-Mahmood
Shopify Partner
390 67 76

try this

@media (min-width: 1024px) {
  [data-block-type="title"],
  [data-group-type="text-with-rating"] {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
}

 

If my solution has been helpful, you can consider supporting me via Buy Me a Coffee.
Hire me: asadmahmood8470@gmail.com
WhatsApp
Fiver




Geltier
Excursionist
30 0 8

I tried a few times, did not work for us..

tim
Shopify Partner
4278 489 1573

This is what I do not like on your page:

 

You have this rule in your "Custom CSS" setting of this section:

div {
  padding-right: 1px;
  padding-left: 1px;
}

 

This is very broad rule and applies to much more elements then you've intended -- I've added outline so you can see which ones are affected:

Screenshot 2025-04-07 at 11.23.38 AM.png

 

 I've used outline because it does not affect size itself.

 

Those broad blue stripes are not thick borders -- they are accumulated due to nested divs, and here is your second problem -- there is too much nesting in your product description (probably too much copy/pastes), and it's different nesting depth for different products, which means the thickness of these "bands" (white space in real life) will be different for different products.

 

Some other products have it even worse -- twice as thick.

div {
  padding-right: 2px;
  padding-left: 2px;
}

 

I'd remove these rules mentioned above and it will align description with heading:

Screenshot 2025-04-07 at 11.30.49 AM.png

 

Now, if you'd like to align your cart button to the left edge, you can remove this rule added to the layouts/theme.liquid above the </body>:

    <style>
      buy-buttons.buy-buttons {
        padding: 0 12px !important;
      }
    </style>

 

Screenshot 2025-04-07 at 11.37.03 AM.png

If my post is helpful, consider liking it -- it will help others with similar problem to find a solution.
I can be reached via e-mail tairli@yahoo.com