Zenocavallari Posted May 8, 2023 Share Posted May 8, 2023 URL: cantinalepietre.com Hi guys, I have two language switch ENG and ITA for Italian, I want to use flags instead. I've tried adding this code: /* REPLACE ENG/ITA WITH FLAGS */ $('.lang-en').html('<img src="https://cdn.countryflags.com/thumbs/united-kingdom/flag-round-250.png" alt="English">'); $('.lang-it').html('<img src="https://cdn.countryflags.com/thumbs/italy/flag-round-250.png" alt="Italiano">'); But it's not working since the flags cover all the items in the menu Link to comment
Solution tuanphan Posted May 10, 2023 Solution Share Posted May 10, 2023 Try adding to Design > Custom CSS header#header div.header-nav-item:last-child>a { background-image: url(https://cdn.countryflags.com/thumbs/united-kingdom/flag-round-250.png); background-size: 30px; background-repeat: no-repeat; color: transparent; } header#header div.header-nav-item:nth-last-child(2)>a { background-image: url(https://cdn.countryflags.com/thumbs/italy/flag-round-250.png); background-size: 30px; background-repeat: no-repeat; color: transparent; } Zenocavallari 1 Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!) Link to comment
Zenocavallari Posted May 16, 2023 Author Share Posted May 16, 2023 works perfectly! thanks Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment