Breadcrumb Alignment for Collection and Product Pages

Solved

Breadcrumb Alignment for Collection and Product Pages

manbru
Pathfinder
129 0 30

Hey,

 

I have added code to align the breadcrumbs on the collection page with a 350px margin-left.

However, on the product page, I want the breadcrumbs to have a 70px margin-left but haven’t been able to achieve that.

 

This code is my current code and the one that I only want on the collection page:

 

<style>
@media (min-width: 769px) {
.breadcrumbs {
  margin-left: 350px;
}
}
</style>

 

But on the product page i want the breadcrumbs to have a 70px margin-left.

 

 

Here's the collection page: https://r1vex.myshopify.com/collections/all 

Here's the product page: https://r1vex.myshopify.com/products/akpase-rondane-frost-raven-black 

 

On collection page, good:

Skärmavbild 2024-09-27 kl. 16.41.59.png

 

On product page, not good:

Skärmavbild 2024-09-27 kl. 16.43.21.png

 

 

Thanks for helping!

Accepted Solution (1)

Made4uo-Ribe
Shopify Partner
10038 2387 3014

This is an accepted solution.

Hi @manbru 

Check this one. 

Paste it on the theme.liquid. 

 

{% if template.name == 'product' %}
<style>
  @media (min-width: 769px) {
    .breadcrumbs {
      margin-left: 70px;
    }
  }
</style>
{% endif %}

 

And save. 

 

 

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

If this fixed your issue, Likes and Accept as Solution are highly appreciated. Coffee tips fuel my dedication.
Get experienced Shopify developers at affordable rates—visit Made4Uo.com for a quick quote!
Need THEME UPDATES but have custom codes? No worries, for an affordable price.

View solution in original post

Replies 2 (2)

Moeed
Shopify Partner
7073 1903 2332

Hey @manbru 

 

Replace your current code with this code

 

{% if template == 'collection' %}
<style>
@media (min-width: 769px) {
.breadcrumbs {
  margin-left: 350px;
}
}
</style>
{% endif %}
{% if template.name == 'product' %}
<style>
  @media (min-width: 769px) {
    .breadcrumbs {
      margin-left: 70px;
    }
  }
</style>
{% endif %}

 

 

If I managed to help you then, don't forget to Like it and Mark it as Solution!

 

Best Regards,
Moeed

- Need a Shopify Specialist? Chat on WhatsApp

- Get a quick Shopify quote – Click here!

- Custom Design | Advanced Coding | Store Modifications


Made4uo-Ribe
Shopify Partner
10038 2387 3014

This is an accepted solution.

Hi @manbru 

Check this one. 

Paste it on the theme.liquid. 

 

{% if template.name == 'product' %}
<style>
  @media (min-width: 769px) {
    .breadcrumbs {
      margin-left: 70px;
    }
  }
</style>
{% endif %}

 

And save. 

 

 

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

If this fixed your issue, Likes and Accept as Solution are highly appreciated. Coffee tips fuel my dedication.
Get experienced Shopify developers at affordable rates—visit Made4Uo.com for a quick quote!
Need THEME UPDATES but have custom codes? No worries, for an affordable price.