cancel
Showing results for 
Search instead for 
Did you mean: 

Remove Space After Layered Navigation Count

Remove Space After Layered Navigation Count

I've noticed in Magento 2x there is a small one space gap after the Layered Navigation filter count value.

gp.jpg

In the HTML output you can see that a single space is added after the count numbers, see after the 5 there is a single space gap, it reads "5 ".gap.jpg

Is there any obvious way to close this up? I can only thing to move the closing bracket in by a negative margin but I'd rather just remove the gap from the output entirely.

 

Thank you.

4 REPLIES 4

Re: Remove Space After Layered Navigation Count

Hello @christopher_oliver ,

 

Your screenshots are not visible, I am not sure if it's a bug of Magento itself or not.

please share your Magento version, also it could be because of the theme, or any third party module, share your website URL so we can check that way.

Problem Solved ? Click on 'Kudos' & Accept as Solution ! Smiley Happy

Re: Remove Space After Layered Navigation Count

Can anyone see my screenshots?

They show for me fine Smiley Frustrated

Re: Remove Space After Layered Navigation Count

@christopher_oliver 

 

Share your Magento version, I am using Magento 2.4.2 and not able to see any space.

https://www.awesomescreenshot.com/image/9793199?key=7fe611427a61d9760b813c22248f1999

 

Are you using any third party theme ? or any third party theme related with layered navigation ?

if Yes, disable that for once and verify again.

Problem Solved ? Click on 'Kudos' & Accept as Solution ! Smiley Happy

Re: Remove Space After Layered Navigation Count

I figured this out.

My custom theme filter.phtml must have had hidden whitespace characters.

 

File: app/design/frontend/ThemeName/theme/Magento_LayeredNavigation/templates/layer/filter.phtml

 

I had to left align all the code in that file

like

this

and then the gap was gone.