I am building a navigation bar which will be located at the top of every page on the CMS I am developing. This navigation bar contains a series of images and text links, some of which will trigger a drop-down menu.
I am having trouble with several parts of this navigation bar, take a look at this Fiddle http://jsfiddle.net/spryno724/uARnf/:
- I cannot get the right side of the drop-down menus to line-up with the right side of the menu triggers.
- How can I have the menu disappear when the user clicks outside of the menu and it’s trigger?
- [BONUS!!!] When the preview frame loads, there is a small amount of left/right scrolling that you can do. This is the same in the actual application. How can I remove that?
Sorry for the crash list of questions, but I am at a really big hang-up. Could someone help me resolve these?
Thank you for your time!
The code below should cover all your issues. Just replace your CSS rules and jQuery/JavaScript with the below code. Live example: http://jsfiddle.net/uARnf/5/
CSS:
jQuery: