How to add a CSS Menu to VSD - Post...

User 2147626 Photo


Ambassador
2,958 posts

Looking at the page source Eric, I think he's already done that.
<body>
<!-- Website Analytics Code -->
<script src="zIndexFixMb.js"></script>


I'm curious though...does that work with ANY css menu? Or just Menu Builder?
Graphics for the web, email, blogs and more!
-------------------------------------
https://sadduck.com
User 239547 Photo


Registered User
28 posts

Alright...got it to work. I edited the zIndexFixMb.js file changing the container name to match the css file. Thanks for the help.
User 187934 Photo


Senior Advisor
20,190 posts

Mark Tellefson wrote:
Alright...got it to work. I edited the zIndexFixMb.js file changing the container name to match the css file. Thanks for the help.

There you go.;)
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 2147626 Photo


Ambassador
2,958 posts

Answered my question too.Thanks for posting back! :cool:
Graphics for the web, email, blogs and more!
-------------------------------------
https://sadduck.com
User 2670298 Photo


Registered User
16 posts

Hello gentlemen - can you help a newbie out here? Please explain this line? I edited the zIndexFixMb.js file changing the container name to match the css file.

I am looking in this file and there are 5 lines, I am assuming the #menuBuilderContainer is the the container name variable but after that I am lost.

As my website has several pages running into various levels of issues with this one drop down menu I would really like to have a single fix if possible.
Here is just one of the pages (and please note - this is just a work in progress)

http://www.kevinjball.com/secretariat.html

Thanks.
User 2670298 Photo


Registered User
16 posts

Sorry - the button in question is the 'Events' button - top bar - second button from the left
User 239547 Photo


Registered User
28 posts

I edited the xIndexFixMb.js file as shown below:

$(document).ready(function(){
$('#cssmenu').parent().css({"z-index": 9999});
});

The #cssmenu was found in my styles.css file that was created by the menu software I was using. The beginning of that file is shown below:

@import url(http://fonts.googleapis.com/css?family= … ns:400,700);
#cssmenu,
#cssmenu ul,
#cssmenu ul li,
#cssmenu ul li a,
#cssmenu #menu-button {
margin: 0;
padding: 0;
border: 0;
list-style: none;
line-height: 1;
display: block;
position: relative;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}

Both files are saved to the root of my site and then I added the <script src="zIndexFixMb.js"></script> line as Website Analytics Code. This would need to be added to each page I believe.

Good luck.
User 2670298 Photo


Registered User
16 posts

So if I understand correctly - I will need a copy of xIndexFixMb.js for each menu (top and bottom buttons) I have - with the menu name hardcoded (in this case #cssmenu) instead of #menuBuilderContainer?

Here is the top of my file - see attached file

Attachments:
User 239547 Photo


Registered User
28 posts

Keep in mind...I am no pro and might have been lucky to get mine working correctly.

I don't believe you need anything for the bottom menu since it isn't causing problems with being overwritten. I would try putting #MenuBuilder in place of #menuBuilderContainer in the zIndexFixMb.js file.
User 2670298 Photo


Registered User
16 posts

I have made the change to the file and it appears I do not need to add the website analystics to each page as it appears by default whenever I click on the 'Insert Website Analystics'.

However - even then this did not work. I did group the background and text together and 'put that to the back' and put the top menu bar to the front and the buttons now appear to be working when I preview them. Just waiting for my hosting site to refresh my pages

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.