Hello All,
I would like to find out how to add an image as a button background for the navigation menu, without the actionable area (the part where the button can be clicked), being larger than the image itself.
Another issue is that after adding the image as the button, it then moves itself out of line compared to the other navigation menu items.
I have tried changing the location of the button with “margin” and “padding-left/padding-right” CSS, but it has not worked unfortunately.
The code to implement the background image is as follows:
.nav-bar__item a[href=“/collections/halloween”] {
min-width: 125px;
background: transparent!important;
background-image: url(https://cdn.shopify.com/s/files/1/1779/2423/files/Halloween_Button_updated.png?v=1695201412)!important!important);
background-size: contain !important;
background-repeat: no-repeat!important;
background-position: center!important;
min-height: 100px !important;
font-size: 0px;
min-height: 150px;
}
This is what it looks like after the code:
Would anyone be able to provide a solution so that it keeps the same size as the rest of the buttons, and stays in line with the rest of the navigation menu?
The website can be found here: https://toptoys2u.co.uk/
Many thanks to any help!


