Changing menu font size by code

Hi

I found this nice code for changing the font size of text element responsivly

and it’s working great. the point is that I’m trying to use it for my menu element (because on small desktop screens it does not scale down (as it should in a responsive site), but I can’t find out how to reference the menu items text.
this code isn’t working for me. (but it is working on a normal text element)

Thank you.


$w.onReady( function () {
makeResponsive(“#menu1”,“h4”,5);
});

function makeResponsive(elementId,textTheme,fontSize,fontColor,lineHeight,charSpacing,width) {

let style = “font-size:”+fontSize+“vw;color:”+fontColor+“;line-height:”+lineHeight+“;letter-spacing:”+charSpacing+“vw;width:”+width+“vw”;

$w(elementId).html = “<”+textTheme+" style=“+style+”>“+$w(elementId).text+”</“+textTheme+”>";

}

In order to change the font size in the Main menu, please add this to Customize → Additional CSS

.navbar-nav > li > a {
    font-size: 13px;
}

Adjust 13px as you like it.
Please let me know if this works for you.
Kind regards.
Source: Vaporwave Text Generator 【Just Copy & Paste】 - FontVilla.com