Two Mega Menus on one page with Custom CSS possible?
Permalink Browser Info Environment
Is it possible to have two Mega Menus on the same page, each with a Custom CSS?
Type: | Discussion |
---|---|
Status: | In Progress |
This is not working but perhaps I don't understand fully...
I tried putting this in the Custom CSS of the block:
Block #1
Block #2
I tried putting this in the Custom CSS of the block:
Block #1
/* Submenu Container Styles */ #id { 01; } .jbmm.custom ul.mega-menuh li .sub-container {position: absolute; padding: 20px; margin-left: 0px; margin-top:0px; background-color:#ffffff; letter-spacing: 0px;} .jbmm.custom ul.mega-menuh li .sub-container.mega {padding-left: 20px; padding-top:0px;} .jbmm.custom ul.mega-menuh li .sub {padding: 0px;} .jbmm.custom ul.mega-menuh li .sub-container.mega .sub {padding: 20px 10px 10px 0;} .jbmm.custom ul.mega-menuh li .sub .row {width: 100%; overflow: hidden; clear: both;} .jbmm.custom ul.mega-menuh li .sub li {list-style: none; float: none; width: 170px; font-size: 1em; font-weight: normal;}
Block #2
/* Submenu Container Styles */ #id { 02; } .jbmm.custom ul.mega-menuh li .sub-container {position: absolute; padding: 20px; margin-left: 0px; margin-top:0px; background-color:#ffffff; letter-spacing: 0px;} .jbmm.custom ul.mega-menuh li .sub-container.mega {padding-left: 20px; padding-top:0px;} .jbmm.custom ul.mega-menuh li .sub {padding: 0px;} .jbmm.custom ul.mega-menuh li .sub-container.mega .sub {padding: 20px 10px 10px 0;} .jbmm.custom ul.mega-menuh li .sub .row {width: 100%; overflow: hidden; clear: both;} .jbmm.custom ul.mega-menuh li .sub li {list-style: none; float: none; width: 170px; font-size: 1em; font-weight: normal;}
Try it like this
/* Submenu Container Styles Block 1 */ #01 { .jbmm.custom ul.mega-menuh li .sub-container {position: absolute; padding: 20px; margin-left: 0px; margin-top:0px; background-color:#ffffff; letter-spacing: 0px;} .jbmm.custom ul.mega-menuh li .sub-container.mega {padding-left: 20px; padding-top:0px;} .jbmm.custom ul.mega-menuh li .sub {padding: 0px;} .jbmm.custom ul.mega-menuh li .sub-container.mega .sub {padding: 20px 10px 10px 0;} .jbmm.custom ul.mega-menuh li .sub .row {width: 100%; overflow: hidden; clear: both;} .jbmm.custom ul.mega-menuh li .sub li {list-style: none; float: none; width: 170px; font-size: 1em; font-weight: normal;}
/* Submenu Container Styles Block 2 */ #02 { .jbmm.custom ul.mega-menuh li .sub-container {position: absolute; padding: 20px; margin-left: 0px; margin-top:0px; background-color:#ffffff; letter-spacing: 0px;} .jbmm.custom ul.mega-menuh li .sub-container.mega {padding-left: 20px; padding-top:0px;} .jbmm.custom ul.mega-menuh li .sub {padding: 0px;} .jbmm.custom ul.mega-menuh li .sub-container.mega .sub {padding: 20px 10px 10px 0;} .jbmm.custom ul.mega-menuh li .sub .row {width: 100%; overflow: hidden; clear: both;} .jbmm.custom ul.mega-menuh li .sub li {list-style: none; float: none; width: 170px; font-size: 1em; font-weight: normal;}
Hmmm. Not working. I should mention that the attribute I want to adjust is the font spacing.
Using your method if I adjust the letter-spacing it adjusts it for both blocks, but I want each to have their own values.
Here's my whole Custom CSS:
Using your method if I adjust the letter-spacing it adjusts it for both blocks, but I want each to have their own values.
Here's my whole Custom CSS:
/* General Styles */ .mega-menuh ul, .mega-menuh ul li {list-style: none;} .mega-menuh ul {position: relative; padding: 0; margin: 0;} .mega-menuh ul li ul {display: none;} .mega-menuh .sub {display: none;} .mega-menuh .sub ul {display: block;} /* Font Styles */ .jbmm.custom {font: normal 13px Lato, sans-serif; !important; line-height: 16px !important; height:40px; letter-spacing: 12.5px;} .jbmm.custom ul.mega-menuh, .jbmm.custom ul.mega-menuh, .jbmm.custom ul.mega-menuh li {margin: 0; padding: 0; border: none;} /* Background Styles */ .jbmm.custom ul.mega-menuh {background: #fff; width: 100%; height: 40px; border-right: 1px solid #ffffff; border-left: 1px solid #ffffff; position: relative;} .jbmm.custom ul.mega-menuh li {float: left; margin: 0; padding: 0; font-size: 13px !important;} /* Link Styles */ .jbmm.custom ul.mega-menuh li a {float: left; display: block; color: #000 !important; padding: 10px 40px 10px 40px !important; text-shadow: 1px 1px 1px #fff; font-weight: 300; text-decoration: none; !important;} .jbmm.custom ul.mega-menuh li a.dc-mega {position: relative; padding: 10px 40px 10px 40px !important;}
Viewing 15 lines of 42 lines. View entire code block.
Hi
If you have set an ID in the menu container like this:
You can style it like this"
Does that make sense?
JZ
If you have set an ID in the menu container like this:
<div id="mega-menu">
You can style it like this"
#mega-menu ul.mega-menu li { /*some rules here*/ } #mega-menu ul.mega-menu li .sub-container { /*some rules here*/ }
Does that make sense?
JZ
Good question. It should be possible if you use a specific ID attribute for the container of the Menushttp://www.w3schools.com/cssref/sel_id.asp... and use that to identify uniquely int the custom css text area.
Does that help?
JZ