Responsive Menu Formatting Question

Issues related to hyperlinks and web site navigation.
Forum rules
PLEASE READ THE FORUM RULES BEFORE YOU POST:
viewtopic.php?f=12&t=1901

MUST READ:
http://www.wysiwygwebbuilder.com/links.html
Post Reply
StrategicOne
 
 
Posts: 1
Joined: Wed Feb 22, 2023 6:07 pm

Responsive Menu Formatting Question

Post by StrategicOne »

How would one go about setting a different background color, more specifically the alpha value, when a responsive nav menu is in breakpoint mode? My main menu background color is configured with a transparent (alpha=0) when the menu is in full mode. In breakpoint mode, having the menu dropdown with a transparent background just doesn't fit in well with the page... if anything, I'd prefer it to use the submenu formatting so there's contrast between the menu and the page content.

Thanks in advance for any suggestions!
User avatar
Pablo
 
Posts: 22472
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: Responsive Menu Formatting Question

Post by Pablo »

You cannot use a different alpha value in breakpoints, so you will need to use a separate menu for that.
User avatar
crispy68
 
 
Posts: 2912
Joined: Thu Oct 23, 2014 12:43 am
Location: Acworth, GA
Contact:

Re: Responsive Menu Formatting Question

Post by crispy68 »

You can't do it within the menu as Pablo stated but you can add some CSS via an html object to do it.

Add the following between the <head> tags:

Code: Select all

<style>
@media (max-width:1023px){.ResponsiveMenu1 li{background:rgba(0,0,0,0.5);}}
</style>
You will need to change the max-width value to 1px below where the menu changes to responsive, edit the 'ResponsiveMenu1' to match your menu ID and of course use whatever color and alpha value you want.
Post Reply