How to scale the logo in the navbar

Open to all! Ask other shopowners for help.
heatherbell
Senior Contributor
Posts: 2540
Joined: Mon Oct 07, 2019 4:39 am
Phoenix Version:
Has thanked: 35 times
Been thanked: 243 times

Re: How to scale the logo in the navbar

Post by heatherbell »

drtom wrote: Fri Jul 04, 2025 2:43 amAdjust logo size according to screen size.
Maybe experiment with CSS clamp(min, preferred, max) for much less code and easier maintenance.
Only as an example:

Code: Select all

.navbar-brand img {
  width: clamp(6rem, calc(10rem + 6vw), 25rem);
  height: auto;
  margin-top: 0;
}


Join The Code Co-op to get access to your library in the Code Co-op Forum
User avatar
drtom
Member
Posts: 49
Joined: Sat May 24, 2025 3:59 am
Phoenix Version: v1.1.0.2
Has thanked: 21 times
Been thanked: 3 times

Re: How to scale the logo in the navbar

Post by drtom »

heatherbell wrote: Fri Jul 04, 2025 5:28 amMaybe experiment with CSS clamp(min, preferred, max) for much less code and easier maintenance.
Only as an example:
That's a new one on me. Always happy to learn. :+1:
User avatar
drtom
Member
Posts: 49
Joined: Sat May 24, 2025 3:59 am
Phoenix Version: v1.1.0.2
Has thanked: 21 times
Been thanked: 3 times

Re: How to scale the logo in the navbar

Post by drtom »

heatherbell wrote: Tue Jul 01, 2025 7:03 amSo, try this in your user.css:

Code: Select all

.offcanvas-body ul.navbar-nav:last-of-type {
  margin-left: auto !important;
}
Anyway, seems to work on this demo https://psiwebsites.com/1103/ but have a test.
I did check it out, because at this point my shop really won't need a search bar.

There is one consequence you may not have intended: the items on the Horizontal Menu also scoot right.
heatherbell
Senior Contributor
Posts: 2540
Joined: Mon Oct 07, 2019 4:39 am
Phoenix Version:
Has thanked: 35 times
Been thanked: 243 times

Re: How to scale the logo in the navbar

Post by heatherbell »

drtom wrote: Sat Jul 05, 2025 1:24 am There is one consequence you may not have intended: the items on the Horizontal Menu also scoot right.
Without the Maufacturers it will, so add the target for the cm-navbar parent like:

Code: Select all

.cm-navbar .offcanvas-body ul.navbar-nav:last-of-type {
  margin-left: auto !important;
}
User avatar
drtom
Member
Posts: 49
Joined: Sat May 24, 2025 3:59 am
Phoenix Version: v1.1.0.2
Has thanked: 21 times
Been thanked: 3 times

Re: How to scale the logo in the navbar

Post by drtom »

heatherbell wrote: Sat Jul 05, 2025 4:46 amWithout the Maufacturers it will, so add the target for the cm-navbar parent like:

Code: Select all

.cm-navbar .offcanvas-body ul.navbar-nav:last-of-type {margin-left: auto !important;}
Bingo!


Join The Code Co-op to get access to your library in the Code Co-op Forum
Post Reply