Breadcrumb navigation alignment & mobile adjustment

Breadcrumb navigation alignment & mobile adjustment

emhog
New Member
6 0 0

Hi

 

I have added breadcrumb navigation to my website, but can't seem to make it adjust with a margin on the left to align with the logo. It also needs to be flexible for mobile use. The options I've found with adjusting distance, seems to be fixed and doesn't adjust when the window is smaller. I've got the Dawn theme.

emhog_0-1696628460628.png

breadcrumbs.liquid looks like this:

<style>
.breadcrumbs {
margin: 0 0 2em;
}

.breadcrumbs__list {
list-style-type: none;
margin: 0;
padding: 0;
}

.breadcrumbs__item {
display: inline-block;
}

.breadcrumbs__item:not(:last-child):after {
border-style: solid;
border-width: .10em .10em 0 0;
content: '';
display: inline-block;
height: .20em;
margin: 0 .20em;
position: relative;
transform: rotate(45deg);
vertical-align: middle;
width: .20em;
}

.breadcrumbs__link {
text-decoration: underline;
}

.breadcrumbs__link[aria-current="page"] {
color: inherit;
font-weight: normal;
text-decoration: none;
}

.breadcrumbs__link[aria-current="page"]:hover,
.breadcrumbs__link[aria-current="page"]:focus {
text-decoration: underline;
}
@media screen and (max-width: 640px){
nav.breadcrumb, nav.breadcrumb a.Breadcrumbs, nav.breadcrumb span {
margin-left: 5px;
margin-right: 5px;
margin-top: 30px;
font-size: 12px;
text-transform: uppercase;
}
}
</style>

 

Replies 12 (12)

VIEKIN
Shopify Partner
775 93 110

Hi,

To solved that issue, you can add to element which is wrapping breadcrumbs a class "page-width" as like this:

<div class="breadcrumbs page-width">
.....
.....
<div>

 

You can please Like and Accepted Solution if my suggestion helpful. And if you want to customize or develop new feature on Theme or App => Contact to us via Email or Skype.
- Contact Support : Gmail | Skype: live:.cid.309f2fbaceec513
emhog
New Member
6 0 0

Thanks! do I add it to breadcrumbs.liquid, just anywhere? 

 

VIEKIN
Shopify Partner
775 93 110

yes, you need go to breadcrumbs.liquid file and add that class to inside div tag had class breadcrumbs already.

You can please Like and Accepted Solution if my suggestion helpful. And if you want to customize or develop new feature on Theme or App => Contact to us via Email or Skype.
- Contact Support : Gmail | Skype: live:.cid.309f2fbaceec513
emhog
New Member
6 0 0

I've added it in but get an error message, any ideas?

emhog_0-1696709380562.png
Tried here also, with </div> but no change

emhog_1-1696710089378.png

 

Thank you 🙂

 

suyash1
Shopify Partner
9866 1226 1566

@emhog - are you able to save it?

To build shopify pages use pagefly | Contact me - [email protected] , My timezone is GMT+5:30. | Support me
VIEKIN
Shopify Partner
775 93 110

Hi,

You must add that class in here:

<nav class="breadcrumbs page-width">

JosephK_0-1696817567390.png

 

You can please Like and Accepted Solution if my suggestion helpful. And if you want to customize or develop new feature on Theme or App => Contact to us via Email or Skype.
- Contact Support : Gmail | Skype: live:.cid.309f2fbaceec513
emhog
New Member
6 0 0

I've added it here, brings the breadcrumb a bit to the right, but doesn't align with logo when full window size, it does however respond to the size of the window when made smaller which is great.

emhog_0-1696820570135.pngemhog_1-1696820624225.png

emhog_2-1696820698594.png

 

VIEKIN
Shopify Partner
775 93 110

Could you share the store url here?

Like that will easy to check and give to you the suggestion.

You can please Like and Accepted Solution if my suggestion helpful. And if you want to customize or develop new feature on Theme or App => Contact to us via Email or Skype.
- Contact Support : Gmail | Skype: live:.cid.309f2fbaceec513
emhog
New Member
6 0 0
Mys.co.Nz
P@ssw0rd

Thank you 😉
VIEKIN
Shopify Partner
775 93 110

Hi,

To solved this issue, you can do follow.

Admin -> Theme -> Customize Code -> assets -> base.css

Then add this code bellow to that file:

.breadcrumbs {
    margin-left: auto;
    margin-right: auto;
    width: 100%;
}

 

You can please Like and Accepted Solution if my suggestion helpful. And if you want to customize or develop new feature on Theme or App => Contact to us via Email or Skype.
- Contact Support : Gmail | Skype: live:.cid.309f2fbaceec513

suyash1
Shopify Partner
9866 1226 1566

@emhog - can you please share the page link from where you got the screenshot?

To build shopify pages use pagefly | Contact me - [email protected] , My timezone is GMT+5:30. | Support me
emhog
New Member
6 0 0

Thank you! It looks better and better. It's still not inline with the logo in fullscreen, but maybe that is the closest it will get? Do you know how to add a layer to it; when you go Products>Collection>Item it only says Home>Item...

🙂

 

www.mys.co.nz