Menu Font Not Always The Same On All Menu Levels - Question | JoomShaper

Menu Font Not Always The Same On All Menu Levels

RD

Robert Deutschmann

Helix Framework 1 month ago

Hi

When open the website the main menu looks like this: Menu font is "Bebas Neue".

But when you click on a submenu e.g. "News" then the main menu changes the font and looks like this:

In the custom.css i put in this code but it looks that this code works only on the "first menu level":

/* Main Menu Desktop Font settings */
.sp-megamenu-parent > li > a, .sp-megamenu-parent > li > span {font-weight: 400; font-family: 'Bebas Neue' !important; font-size: 25px; color: #fafafa;}
.sp-megamenu-parent .sp-dropdown li.sp-menu-item>a, .sp-megamenu-parent .sp-dropdown li.sp-menu-item span:not(.sp-menu-badge){font-family: 'Bebas Neue'!important; font-size: 23px; color: var(--_background);}
.sp-megamenu-parent > li.active > a, .sp-megamenu-parent > li.active:hover > a {font-weight: 400; font-family: 'Bebas Neue' !important; font-size: 25px; color: #fafafa;}
.sp-megamenu-parent > li > a:hover, .sp-megamenu-parent > li:hover > a  {font-weight: 400; font-family: 'Bebas Neue' !important; font-size: 25px; color: #fafafa;}

Any idea how i can correct this?

Many thanks for any support. Best regards, Robert

0
6 Answers
Mehtaz Afsana Borsha
Mehtaz Afsana Borsha
Accepted Answer
Support Agent 1 month ago #162156

Hi Robert

Glad to know that its solved and thanks for sharing the solution. You can now close this post by accepting the answer.

0
Mehtaz Afsana Borsha
Mehtaz Afsana Borsha
Accepted Answer
Support Agent 1 month ago #162039

Hi

Thanks for contacting us and sorry for your issue. Use this CSS in your custom.css file

.sp-megamenu-parent > li > a, .sp-megamenu-parent > li > span{
  font-family: 'Bebas Neue' !important;
}

-Regards.

0
RD
Robert Deutschmann
Accepted Answer
1 month ago #162042

Hi

Thank you for your reply.

I modified the custom.css like this now:

.sp-megamenu-parent > li > a, .sp-megamenu-parent > li > span {font-weight: 400; font-family: 'Bebas Neue' !important; font-size: 25px; color: #fafafa;}
.sp-megamenu-parent .sp-dropdown li.sp-menu-item>a, .sp-megamenu-parent .sp-dropdown li.sp-menu-item span:not(.sp-menu-badge){font-family: 'Bebas Neue'!important; font-size: 23px; color: var(--_background);}
.sp-megamenu-parent > li.active > a, .sp-megamenu-parent > li.active:hover > a {font-weight: 400; font-family: 'Bebas Neue' !important; font-size: 25px; color: #fafafa;}
.sp-megamenu-parent > li > a:hover, .sp-megamenu-parent > li:hover > a  {font-weight: 400; font-family: 'Bebas Neue' !important; font-size: 25px; color: #fafafa;}

But still the same problem.

0
RD
Robert Deutschmann
Accepted Answer
1 month ago #162055

Hi

Meantime i found out something special: it looks like after selecting a submenu like "News" the menu doesn't use the locally installed font "Bebas Neue". I have to install the font locally because of the DSGVO requirements in Germany.

I can simulate this effect when enabling the Typography-Navigation. Doing this the menu after selecting the submenu "News" looks fine. That means the menu font is still "Bebas Neue" - BUT now the font will be loading from the Google-Server but that is not DSGVO-conform.

When disabling the Typography-Navigation and go on the start page of the website the menu-font is "Bebas Neue" but when selecting a submenu like "News" the menu is displayed in another font-family.

Hope this helps.

Thanks in advance for support. br, Robert

0
RD
Robert Deutschmann
Accepted Answer
1 month ago #162149

Hi

Heureka, Problem solved. After installing the "BebasNeue-Regular.ttf" in the ../templates/fonts-directory and updated the custom.css with this lines

@font-face {
  font-family: 'bebasneue_regular';
  src: url('../fonts/BebasNeue-Regular.ttf') format('truetype');
  font-weight: <weight>;
  font-style: bold;
}

h1, h2, h3
{ font-family: "bebasneue_regular", sans-serif;
  font-optical-sizing: auto;
  font-weight: <weight>;
  font-style: normal;
  color: #FFF; 
}
strong, b  {font-family: "bebasneue_regular", sans-serif;  font-weight: 700;}
h3 {font-size: 40px}

.sp-megamenu-parent > li > a, .sp-megamenu-parent > li > span {font-weight: 400; font-family: 'bebasneue_regular' !important; font-size: 25px; color: #fafafa;}
.sp-megamenu-parent .sp-dropdown li.sp-menu-item>a, .sp-megamenu-parent .sp-dropdown li.sp-menu-item span:not(.sp-menu-badge){font-family: 'bebasneue_regular'!important; font-size: 23px; color: var(--_background);}
.sp-megamenu-parent > li.active > a, .sp-megamenu-parent > li.active:hover > a {font-weight: 400; font-family: 'bebasneue_regular' !important; font-size: 25px; color: #fafafa;}
.sp-megamenu-parent > li > a:hover, .sp-megamenu-parent > li:hover > a  {font-weight: 400; font-family: 'bebasneue_regular' !important; font-size: 25px; color: #fafafa;}

now, on all levels the local installed font is using correctly and so the DSGVO(GDPR) requirements are done.

Regards

0
RD
Robert Deutschmann
Accepted Answer
1 month ago #162151

btw: i downloaded the font from the Google-Font-website https://fonts.google.com/selection?query=bebas+neue

0