Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop Down Issue - Please Help! #128

Open
thebeautybudget opened this issue May 23, 2013 · 2 comments
Open

Drop Down Issue - Please Help! #128

thebeautybudget opened this issue May 23, 2013 · 2 comments

Comments

@thebeautybudget
Copy link

Ok - so when using drop down navigation in the main walker nav that is included in the theme there is an issue.

Issue #1 -

You actually have to click the parent nav to get the sub nav to show

Issue #2 -

The parent nav is a parent category so should have its own page but it isn't clickable example:

Shopping
-Fashion
-Accessories
-Makeup

when hovering over shopping should the 3 sub categories not automatically show? And shopping should still be clickable but it isnt... by clicking on shopping it only shows the 3 sub nav pages you cant actually click on shopping.

@vinayraghu
Copy link

I have faced a similar issue before for a site I was designing.

The dropdown is intentionally made to work on click rather than on hover. Hover events can be quite frustrating on touch devices. More on the design decision here by Mark Dotto - Bootstrap explained dropdowns

Answer to both your questions are available here on stack overflow

How to make Twitter Bootstrap Menu work on hover

When you make the dropdown appear on hover, you will face an issue.

The dropdown will appear but before you could select any of the links in the menu, the dropdown will disappear.

To resolve that, you need to remove the 1px margin.

Essentially, you append the below lines to your dropdown.less and recompile your stylesheet. You should be ready.

//Open Drop down on hover 
ul.nav li.dropdown:hover > ul.dropdown-menu{
display: block;
}
//Remove the margin 
.navbar .dropdown-menu {
 margin-top: 0px;
}

To make the parent nav clickable for Issue#2, strip the anchor tag for the parent nav link. Remove the class and data-toggle and have it as below:

<a href="link/to/your/parent">
    Dropdown
    <b class="caret"></b>
</a>

@websiag
Copy link

websiag commented Jul 19, 2017

how can i remove the "class" and "data-toggle"?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants